summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-24 18:32:07 +0200
committerraveit65 <[email protected]>2016-06-29 16:23:03 +0200
commit2364be65f6611547e86c5f91dcd1f696d9f3869e (patch)
tree79e9dca986932b5bc8a9bacbe0c4655de2fa381f
parentb57a2d3da077bfba4b5b3154afd90019b5833778 (diff)
downloadatril-2364be65f6611547e86c5f91dcd1f696d9f3869e.tar.bz2
atril-2364be65f6611547e86c5f91dcd1f696d9f3869e.tar.xz
Refresh thumbnail only when window has a document
This prevents a critical warning when opening a document that was rotated in a previous Evince session. taken from: https://git.gnome.org/browse/evince/commit/?id=1b5cf70
-rw-r--r--shell/ev-window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 59d9f230..993df17e 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1458,7 +1458,7 @@ ev_window_refresh_window_thumbnail (EvWindow *ev_window)
gint rotation;
EvDocument *document = ev_window->priv->document;
- if (!EV_IS_DOCUMENT_THUMBNAILS (document) ||
+ if (!document || ev_document_get_n_pages (document) <= 0 ||
ev_document_get_n_pages (document) <= 0 ||
!ev_document_check_dimensions (document)) {
return;