[gedit] Do not try hiding a non-existing side stack switcher
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Do not try hiding a non-existing side stack switcher
- Date: Mon, 8 Sep 2014 14:29:26 +0000 (UTC)
commit dc614481b59843c420a217e4996d1a7e40418d76
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Mon Sep 8 16:29:01 2014 +0200
Do not try hiding a non-existing side stack switcher
The side stack switcher is set to NULL in the window dispose, but
the side panel stack children can still change numbers when panels
are being removed in the dispose chain up.
gedit/gedit-window.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 5d99bea..77023ff 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -2372,7 +2372,12 @@ on_side_panel_stack_children_number_changed (GtkStack *stack,
}
else
{
- gtk_widget_hide (priv->side_stack_switcher);
+ /* side_stack_switcher can get NULL in dispose, before stack children
+ are being removed */
+ if (priv->side_stack_switcher != NULL)
+ {
+ gtk_widget_hide (priv->side_stack_switcher);
+ }
#ifndef OS_OSX
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (priv->side_headerbar), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]