]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/uma.cpp
otherwise we always fall back to blitting, even if we can provide better results
[wxWidgets.git] / src / mac / carbon / uma.cpp
index 1de3eacf7fd5330c557af4448ef8073735745410..5eb2fbc5ba94663ba1b5092c633d5a0b27a9bedb 100644 (file)
@@ -33,6 +33,9 @@
 #endif
 #include "wx/mac/uma.h"
 
+#if TARGET_API_MAC_OSX
+#include "wx/toplevel.h"
+#endif
 
 // since we have decided that we only support 8.6 upwards we are
 // checking for these minimum requirements in the startup code of
@@ -795,7 +798,7 @@ Rect* UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds)
     WindowRef tlwref = GetControlOwner( theControl ) ;
 
     wxTopLevelWindowMac* tlwwx = wxFindWinFromMacWindow( tlwref ) ;
-    if ( tlwwx->MacUsesCompositing() )
+    if ( tlwwx != NULL && tlwwx->MacUsesCompositing() )
     {
         ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ;
         HIPoint hiPoint = CGPointMake(  0 , 0 ) ;