提交 7bd3ccd9 编写于 作者: A Alexander Alekhin

Merge pull request #8713 from grundman:patch-6

......@@ -222,7 +222,7 @@ public:
};
namespace
{
MatAllocator* g_matAllocator = NULL;
MatAllocator* volatile g_matAllocator = NULL;
}
......@@ -230,7 +230,11 @@ MatAllocator* Mat::getDefaultAllocator()
{
if (g_matAllocator == NULL)
{
g_matAllocator = getStdAllocator();
cv::AutoLock lock(cv::getInitializationMutex());
if (g_matAllocator == NULL)
{
g_matAllocator = getStdAllocator();
}
}
return g_matAllocator;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册