summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/panels/glance.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/panels/glance.c b/src/gui/panels/glance.c
index 0fb8f43..b7ce9da 100644
--- a/src/gui/panels/glance.c
+++ b/src/gui/panels/glance.c
@@ -319,8 +319,17 @@ static void change_glance_panel_current_view(GGlancePanel *panel, GLoadedPanel *
* de la fonction mcb_view_change_support().
*/
- parent = gtk_widget_get_parent(GTK_WIDGET(new));
- if (!GTK_IS_SCROLLED_WINDOW(parent)) return;
+ if (new != NULL)
+ {
+ parent = gtk_widget_get_parent(GTK_WIDGET(new));
+
+ if (!GTK_IS_SCROLLED_WINDOW(parent))
+ {
+ panel->view = NULL;
+ return;
+ }
+
+ }
panel->view = new;