diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-20 17:04:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-20 17:04:57 (GMT) |
commit | 036689f13f9c2d08a91fdd26b9e8dffd252a7e09 (patch) | |
tree | e044bc0535ad254604014ead5707fac43a738dff /src | |
parent | 109bf3ffe74492a9730a9127bfef9a138e811116 (diff) |
Fixed a GTK warning.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/panels/glance.c | 13 |
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; |