From: Kevin Ollivier Date: Mon, 9 Feb 2009 18:48:20 +0000 (+0000) Subject: We'll get an unhandled exception if the view is hidden, fortunately, lockFocusIfCanDr... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ceed527cc9d30e6b79bd0e8fbb52bb3f7739d613?ds=inline We'll get an unhandled exception if the view is hidden, fortunately, lockFocusIfCanDraw does the right thing here, or at least the best we can hope for. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index 3ffcf90407..d7fc6b8f39 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -55,7 +55,7 @@ CGContextRef wxOSXGetContextFromCurrentNSContext() void wxOSXLockFocus( WXWidget view) { - [view lockFocus]; + [view lockFocusIfCanDraw]; } void wxOSXUnlockFocus( WXWidget view)