terminal-screen: Fix warning when closing window

Fixes this warning running inside other terminal when closing the window if this preference is enabled: [when command exits "exit the terminal"]

** (mate-terminal:45473): CRITICAL **: 01:32:55.425: terminal_window_remove_screen: assertion 'gtk_widget_get_toplevel (GTK_WIDGET (screen)) == GTK_WIDGET (window)' failed
Pablo Barciela 2019-12-17 14:44:42 +01:00 committed by Robert Antoni Buj Gelonch
parent 76341a3d52
commit 9529b42518
1 changed files with 2 additions and 1 deletions

View File

@ -1949,7 +1949,8 @@ terminal_screen_child_exited (VteTerminal *terminal, int status)
switch (action)
{
case TERMINAL_EXIT_CLOSE:
g_signal_emit (screen, signals[CLOSE_SCREEN], 0);
if ((status != 9) || (priv->override_command != NULL))
g_signal_emit (screen, signals[CLOSE_SCREEN], 0);
break;
case TERMINAL_EXIT_RESTART:
terminal_screen_launch_child_on_idle (screen);