#include "wx/menuitem.h"
#endif // WX_PRECOMP
+#include "wx/cocoa/ObjcPose.h"
#include "wx/cocoa/NSWindow.h"
#import <Appkit/NSWindow.h>
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));
+ }
}
// ============================================================================