diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 5a51f7074373..6ade98fcd25e 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -5353,9 +5353,12 @@ private: static void collect(GtkWidget* pItem, gpointer widget) { - GtkToolButton* pToolItem = GTK_TOOL_BUTTON(pItem); - GtkInstanceToolbar* pThis = static_cast<GtkInstanceToolbar*>(widget); - pThis->add_to_map(pToolItem); + if (GTK_IS_TOOL_BUTTON(pItem)) + { + GtkToolButton* pToolItem = GTK_TOOL_BUTTON(pItem); + GtkInstanceToolbar* pThis = static_cast<GtkInstanceToolbar*>(widget); + pThis->add_to_map(pToolItem); + } } void add_to_map(GtkToolButton* pToolItem) |