]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/button.cpp
don't use wxTheXXXList in wxXXX ctor/dtor, only objects explicitly created
[wxWidgets.git] / src / mac / button.cpp
index 19600ac5d797cf03fb6c383d28dc2938e21c7bba..03ce6f1b293bb43fb824804c9ee0d162347fcc10 100644 (file)
@@ -108,8 +108,11 @@ void wxButton::Command (wxCommandEvent & event)
 
 void wxButton::MacHandleControlClick( ControlHandle control , SInt16 controlpart ) 
 {
+  if ( controlpart != kControlNoPart )
+  {
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
     event.SetEventObject(this);
     ProcessCommand(event);
+  }
 }