From 2b8f5a2488b051daf6f9c0d161e57e0d1dabeab0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 5 Dec 1999 19:30:45 +0000 Subject: [PATCH] [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 --- src/gtk/tbargtk.cpp | 1 + src/gtk1/tbargtk.cpp | 1 + 2 files changed, 2 insertions(+) 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; -- 2.45.2