diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index 6801bd8a4b..1e47bf6ee3 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -259,11 +259,11 @@ 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 = img; cvShowImage(winname.c_str(), &c_img); - } + } #else const double useGl = getWindowProperty(winname, WND_PROP_OPENGL); CV_Assert(size.width>0 && size.height>0);