[epiphany] notebook: Don't crash if window is being destroyed



commit 21e4dc83d1301dd20252ea304382219cd93c45be
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Feb 11 12:18:24 2017 -0600

    notebook: Don't crash if window is being destroyed
    
    This fixes a crash introduced in the previous commit.

 src/ephy-notebook.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 47ab34b..1d527bb 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -586,6 +586,10 @@ ephy_notebook_rebuild_tab_menu (EphyNotebook *notebook)
 
   window = gtk_widget_get_toplevel (GTK_WIDGET (notebook));
   group = gtk_widget_get_action_group (window, "win");
+  /* Is window being destroyed? */
+  if (group == NULL)
+    return;
+
   action = g_action_map_lookup_action (G_ACTION_MAP (group), "show-tab");
   g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_uint32 ((guint32)current_page));
 }


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