#include "wx/log.h"
#endif // WX_PRECOMP
+#include "wx/cocoa/ObjcPose.h"
+
#include "wx/cocoa/NSButton.h"
#import <AppKit/NSButton.h>
void wxCocoaNSButton::AssociateNSButton(WX_NSButton cocoaNSButton)
{
- sm_cocoaHash.insert(wxCocoaNSButtonHash::value_type(cocoaNSButton,this));
- [cocoaNSButton setTarget: cocoaNSButton];
- [cocoaNSButton setAction: @selector(wxNSButtonAction:)];
+ if(cocoaNSButton)
+ {
+ sm_cocoaHash.insert(wxCocoaNSButtonHash::value_type(cocoaNSButton,this));
+ [cocoaNSButton setTarget: cocoaNSButton];
+ [cocoaNSButton setAction: @selector(wxNSButtonAction:)];
+ }
}