core: fix nSize initialization in cvIplImage()

This commit is contained in:
Alexander Alekhin 2021-06-09 07:31:38 +00:00
parent b221143c0f
commit 5f80f43ff5

View File

@ -358,7 +358,11 @@ _IplImage
needed for correct deallocation */
#if defined(CV__ENABLE_C_API_CTORS) && defined(__cplusplus)
_IplImage() {}
_IplImage()
{
memset(this, 0, sizeof(*this)); // valid for POD structure
nSize = sizeof(IplImage);
}
_IplImage(const cv::Mat& m) { *this = cvIplImage(m); }
#endif
}