diff options
author | Andre Miranda <andreldm@xfce.org> | 2020-12-16 19:48:49 -0300 |
---|---|---|
committer | Alexander Schwinn <alexxcons@xfce.org> | 2020-12-16 23:57:51 +0100 |
commit | 59fd8e1011df2e41a6e1578de93ad03d003158d9 (patch) | |
tree | 8a18df522b9f1963fe2b4078b8434dae99758d8e | |
parent | 3dcb1afdfa48993ec6d771cb7a3b45fa371aa868 (diff) | |
download | thunar-59fd8e1011df2e41a6e1578de93ad03d003158d9.tar.gz |
Avoid crashes when closing thunar with ctrl+w (#336)
-rw-r--r-- | thunar/thunar-window.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index b38a1e70..ea3affc6 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -2537,7 +2537,9 @@ static void thunar_window_action_close_tab (ThunarWindow *window, GtkWidget *menu_item) { - if (window->view != NULL) + if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->notebook)) == 1) + gtk_widget_destroy (GTK_WIDGET (window)); + else if (window->view != NULL) gtk_widget_destroy (window->view); } |