提交 439ef644 编写于 作者: S Suleyman TURKMEN

Update window.cpp

上级 9cab808c
......@@ -963,6 +963,8 @@ void cv::imshow( const String& winname, InputArray _img )
{
CV_TRACE_FUNCTION();
const Size size = _img.size();
CV_Assert(size.width>0 && size.height>0);
{
cv::AutoLock lock(cv::getWindowMutex());
cleanupClosedWindows_();
......@@ -995,9 +997,7 @@ void cv::imshow( const String& winname, InputArray _img )
}
}
const Size size = _img.size();
#ifndef HAVE_OPENGL
CV_Assert(size.width>0 && size.height>0);
{
Mat img = _img.getMat();
CvMat c_img = cvMat(img);
......@@ -1005,7 +1005,6 @@ void cv::imshow( const String& winname, InputArray _img )
}
#else
const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
CV_Assert(size.width>0 && size.height>0);
if (useGl <= 0)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册