X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ca41e57f48db4c1a2de7ae67c7e4b655d9809af..605c9c8318875c590fce53cd2ce5d5aabcc92564:/src/gtk/button.cpp?ds=sidebyside diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index db5235be66..8338f5bcff 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -45,14 +45,20 @@ static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton * IMPLEMENT_DYNAMIC_CLASS(wxButton,wxControl) -wxButton::wxButton(void) +wxButton::wxButton() { } +wxButton::~wxButton() +{ + if (m_clientData) delete m_clientData; +} + bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, long style, const wxValidator& validator, const wxString &name ) { + m_clientData = (wxClientData*) NULL; m_needParent = TRUE; wxSize newSize = size; @@ -118,3 +124,4 @@ void wxButton::ApplyWidgetStyle() gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle ); } +