Commit 4c28066d53c5cc142f91158875ab71f51f7e7565
1 parent
c43ee207
Exists in
master
and in
4 other branches
Fixing segfault when closing window with an online terminal.
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
src/objects/window/window.c
| @@ -54,10 +54,16 @@ | @@ -54,10 +54,16 @@ | ||
| 54 | gchar ** actions = g_action_group_list_actions(G_ACTION_GROUP(widget)); | 54 | gchar ** actions = g_action_group_list_actions(G_ACTION_GROUP(widget)); |
| 55 | 55 | ||
| 56 | for(ix = 0; actions[ix]; ix++) { | 56 | for(ix = 0; actions[ix]; ix++) { |
| 57 | + | ||
| 57 | GAction * action = g_action_map_lookup_action(G_ACTION_MAP(widget), actions[ix]); | 58 | GAction * action = g_action_map_lookup_action(G_ACTION_MAP(widget), actions[ix]); |
| 58 | 59 | ||
| 59 | - if(action && PW3270_IS_ACTION(action)) { | 60 | + if(!action) |
| 61 | + continue; | ||
| 62 | + | ||
| 63 | + if(PW3270_IS_ACTION(action)) { | ||
| 60 | pw3270_action_set_terminal_widget(action,NULL); | 64 | pw3270_action_set_terminal_widget(action,NULL); |
| 65 | + } else if(V3270_IS_ACTION(action)) { | ||
| 66 | + v3270_action_set_terminal_widget(action,NULL); | ||
| 61 | } | 67 | } |
| 62 | 68 | ||
| 63 | } | 69 | } |