]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/NSButton.h
deprecated Initialize/CleanUpClasses
[wxWidgets.git] / include / wx / cocoa / NSButton.h
index a6f9b2f57f7d41933a2ccca4c8597152fad70050..687fd77655b5e092d2b7b85514412dbab133bae1 100644 (file)
@@ -13,7 +13,7 @@
 #define __WX_COCOA_NSBUTTON_H__
 
 #include "wx/hashmap.h"
 #define __WX_COCOA_NSBUTTON_H__
 
 #include "wx/hashmap.h"
-#include "wx/cocoa/ObjcPose.h"
+#include "wx/cocoa/ObjcAssociate.h"
 
 WX_DECLARE_OBJC_HASHMAP(NSButton);
 
 
 WX_DECLARE_OBJC_HASHMAP(NSButton);
 
@@ -24,7 +24,8 @@ public:
     void AssociateNSButton(WX_NSButton cocoaNSButton);
     inline void DisassociateNSButton(WX_NSButton cocoaNSButton)
     {
     void AssociateNSButton(WX_NSButton cocoaNSButton);
     inline void DisassociateNSButton(WX_NSButton cocoaNSButton)
     {
-        sm_cocoaHash.erase(cocoaNSButton);
+        if(cocoaNSButton)
+            sm_cocoaHash.erase(cocoaNSButton);
     }
 
 public:
     }
 
 public: