From: Václav Slavík Date: Sun, 5 Dec 1999 19:30:45 +0000 (+0000) Subject: [gtk] fixed bug that caused segfaults in wxYield when wxToolBar has non-button contr... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2b8f5a2488b051daf6f9c0d161e57e0d1dabeab0?hp=340196c001690cd784e7e3f2fc54cd449324f914 [gtk] fixed bug that caused segfaults in wxYield when wxToolBar has non-button control (m_item was no defined, rather then being set to NULL) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 970873c7e2..1e0f1d9f5f 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -354,6 +354,7 @@ bool wxToolBar::AddControl(wxControl *control) wxToolBarTool *tool = new wxToolBarTool(control); + tool -> m_item = NULL; gtk_toolbar_append_widget( m_toolbar, control->m_widget, (const char *) NULL, (const char *) NULL ); GtkRequisition req; diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 970873c7e2..1e0f1d9f5f 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -354,6 +354,7 @@ bool wxToolBar::AddControl(wxControl *control) wxToolBarTool *tool = new wxToolBarTool(control); + tool -> m_item = NULL; gtk_toolbar_append_widget( m_toolbar, control->m_widget, (const char *) NULL, (const char *) NULL ); GtkRequisition req;