]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/buttonbar.cpp
fix crash which happened if you called SetAttr(NULL) followed by SetAttr(attr) (...
[wxWidgets.git] / src / generic / buttonbar.cpp
index 091dfd01b192905be55eae253d674324a2722254..c05ef6385b4184e27b16fe21e2753bb02cf7edd7 100644 (file)
@@ -493,7 +493,7 @@ void wxButtonToolBar::OnCommand(wxCommandEvent& event)
 }
 
 // paints a border
-void wxButtonToolBar::OnPaint(wxPaintEvent& event)
+void wxButtonToolBar::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
 
@@ -549,7 +549,7 @@ void wxButtonToolBar::OnLeftUp(wxMouseEvent& event)
         {
             wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId());
             event.SetEventObject(tool->GetButton());
-            if (!ProcessEvent(event))
+            if (!GetEventHandler()->ProcessEvent(event))
                 event.Skip();
         }
     }