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