]> git.saurik.com Git - wxWidgets.git/commitdiff
Ensure there is valid context for DrawRectangle
authorRobin Dunn <robin@alldunn.com>
Fri, 12 Apr 2013 23:45:15 +0000 (23:45 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 12 Apr 2013 23:45:15 +0000 (23:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/graphics.cpp

index b1226cccc8d770373907546000bcd0c645006918..c42ffba7f76ec97ca77bdd9294b55fafbe8baddd 100644 (file)
@@ -2708,6 +2708,9 @@ void * wxMacCoreGraphicsContext::GetNativeContext()
 
 void wxMacCoreGraphicsContext::DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h )
 {
+    if (!EnsureIsValid())
+        return;
+
     if (m_composition == wxCOMPOSITION_DEST) 
         return;