From ceed527cc9d30e6b79bd0e8fbb52bb3f7739d613 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Mon, 9 Feb 2009 18:48:20 +0000 Subject: [PATCH] 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 --- src/osx/carbon/utilscocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.49.0