[gnome-terminal] window: Avoid updating the geometry during destruction



commit 94f1c04bb041dca800e4f71f9827afe24cb8c42b
Author: Christian Persch <chpe src gnome org>
Date:   Sat Nov 11 21:49:12 2017 +0100

    window: Avoid updating the geometry during destruction
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789692

 src/terminal-notebook.c |    3 +++
 src/terminal-window.c   |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-notebook.c b/src/terminal-notebook.c
index 19d938e..4e7d56a 100644
--- a/src/terminal-notebook.c
+++ b/src/terminal-notebook.c
@@ -61,6 +61,9 @@ update_tab_visibility (TerminalNotebook *notebook,
   int new_n_pages;
   gboolean show_tabs;
 
+  if (gtk_widget_in_destruction (GTK_WIDGET (notebook)))
+    return;
+
   new_n_pages = gtk_notebook_get_n_pages (gtk_notebook) + change;
   /* Don't do anything if we're going to have zero pages (and thus close the window) */
   if (new_n_pages == 0)
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 0815ab8..663f7f3 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -3115,7 +3115,10 @@ terminal_window_update_geometry (TerminalWindow *window)
   int char_width, char_height;
   int chrome_width, chrome_height;
   int csd_width = 0, csd_height = 0;
-  
+
+  if (gtk_widget_in_destruction (GTK_WIDGET (window)))
+    return;
+
   if (priv->active_screen == NULL)
     return;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]