Commit 4c28066d53c5cc142f91158875ab71f51f7e7565

Authored by Perry Werneck
1 parent c43ee207

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 54 gchar ** actions = g_action_group_list_actions(G_ACTION_GROUP(widget));
55 55  
56 56 for(ix = 0; actions[ix]; ix++) {
  57 +
57 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 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 }
... ...