[evince/gnome-3-36] shell: check type of window/sidebar objects
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-36] shell: check type of window/sidebar objects
- Date: Sat, 30 May 2020 01:55:43 +0000 (UTC)
commit ec4b050a209e583148ed57777a248fa58c4e4fb7
Author: Ilario Gelmetti <iochesonome gmail com>
Date: Fri May 29 18:50:48 2020 +0200
shell: check type of window/sidebar objects
Fixes #1409
shell/ev-sidebar-thumbnails.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index b488dd37..97398bd7 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -1130,7 +1130,10 @@ ev_sidebar_thumbnails_is_two_columns (EvSidebarThumbnails *sidebar)
if (priv->width == 0) {
window = gtk_widget_get_toplevel (GTK_WIDGET (sidebar));
- sidebar_width = ev_window_get_metadata_sidebar_size (EV_WINDOW (window));
+ if (EV_IS_WINDOW (window))
+ sidebar_width = ev_window_get_metadata_sidebar_size (EV_WINDOW (window));
+ else
+ sidebar_width = 0;
} else {
sidebar_width = priv->width;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]