X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb896a322a2ed53d393ee738765ddd3f72cee004..cafc76a4bbbcb59f1c48d9c8f592c671238ffb51:/include/wx/cocoa/NSButton.h diff --git a/include/wx/cocoa/NSButton.h b/include/wx/cocoa/NSButton.h index a6f9b2f57f..687fd77655 100644 --- a/include/wx/cocoa/NSButton.h +++ b/include/wx/cocoa/NSButton.h @@ -13,7 +13,7 @@ #define __WX_COCOA_NSBUTTON_H__ #include "wx/hashmap.h" -#include "wx/cocoa/ObjcPose.h" +#include "wx/cocoa/ObjcAssociate.h" WX_DECLARE_OBJC_HASHMAP(NSButton); @@ -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: