X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ff0b7813665a76c2c693b8de1c16e512daea1fb..47e175a24f862aa8b7ca7dd4a2bb5957991e7f2d:/src/osx/carbon/graphics.cpp diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index b1226cccc8..c42ffba7f7 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -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;