File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -662,14 +662,16 @@ CvRect cvGetWindowRect_COCOA( const char* name )
662662 {
663663 CV_ERROR ( CV_StsNullPtr, " NULL window" );
664664 } else {
665- NSRect rect = [window frame ];
665+ @autoreleasepool {
666+ NSRect rect = [window frame ];
666667#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6
667- NSPoint pt = [window convertRectToScreen: rect].origin ;
668+ NSPoint pt = [window convertRectToScreen: rect].origin ;
668669#else
669- NSPoint pt = [window convertBaseToScreen: rect.origin];
670+ NSPoint pt = [window convertBaseToScreen: rect.origin];
670671#endif
671- NSSize sz = [[[window contentView ] image ] size ];
672- result = cvRect (pt.x , pt.y , sz.width , sz.height );
672+ NSSize sz = [[[window contentView ] image ] size ];
673+ result = cvRect (pt.x , pt.y , sz.width , sz.height );
674+ }
673675 }
674676
675677 __END__;
You can’t perform that action at this time.
0 commit comments