Commit c6e33b67fc3b6043af56e041b3684e82f0a86a95
1 parent
781c9f0a
Exists in
master
and in
2 other branches
Fixing toolbar segfault on application exit.
Showing
2 changed files
with
8 additions
and
1 deletions
Show diff stats
src/objects/toolbar/actions.c
src/objects/toolbar/toolbar.c
... | ... | @@ -363,6 +363,13 @@ |
363 | 363 | |
364 | 364 | void pw3270_toolbar_set_actions(GtkWidget *toolbar, const gchar *action_names) { |
365 | 365 | |
366 | + // The action search requires a toplevel window. | |
367 | + if(!gtk_widget_get_parent(toolbar)) { | |
368 | + g_warning("Can't set actions on an orphan toolbar"); | |
369 | + return; | |
370 | + } | |
371 | + | |
372 | + // Split action names | |
366 | 373 | size_t ix; |
367 | 374 | gint pos = 0; |
368 | 375 | ... | ... |