]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/NSWindow.mm
regenerated makefiles
[wxWidgets.git] / src / cocoa / NSWindow.mm
index 577f1598684bec22797e1390a9399623ee43090f..d230b1a09322037f82e0d26a6466a0b5e96c6f5d 100644 (file)
@@ -23,6 +23,7 @@
     #include "wx/menuitem.h"
 #endif // WX_PRECOMP
 
+#include "wx/cocoa/ObjcPose.h"
 #include "wx/cocoa/NSWindow.h"
 
 #import <Appkit/NSWindow.h>
@@ -34,8 +35,11 @@ WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSWindow)
 
 void wxCocoaNSWindow::AssociateNSWindow(WX_NSWindow cocoaNSWindow)
 {
-    [cocoaNSWindow setReleasedWhenClosed: NO];
-    sm_cocoaHash.insert(wxCocoaNSWindowHash::value_type(cocoaNSWindow,this));
+    if(cocoaNSWindow)
+    {
+        [cocoaNSWindow setReleasedWhenClosed: NO];
+        sm_cocoaHash.insert(wxCocoaNSWindowHash::value_type(cocoaNSWindow,this));
+    }
 }
 
 // ============================================================================