提交 d621a99e 编写于 作者: Z Zhenqing Hu 提交者: Alexander Alekhin

To fix bug #12389, which is a validation for the potential null pointer.

Signed-off-by: NZhenqing Hu <huzq85@gmail.com>
上级 107660c7
......@@ -228,7 +228,7 @@ void SparseMat::create(int d, const int* _sizes, int _type)
}
}
int _sizes_backup[CV_MAX_DIM]; // #5991
if (_sizes == hdr->size)
if (hdr && _sizes == hdr->size)
{
for(int i = 0; i < d; i++ )
_sizes_backup[i] = _sizes[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册