From 2364be65f6611547e86c5f91dcd1f696d9f3869e Mon Sep 17 00:00:00 2001
From: raveit65 <chat-to-me@raveit.de>
Date: Fri, 24 Jun 2016 18:32:07 +0200
Subject: 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
---
 shell/ev-window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'shell')

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;
-- 
cgit v1.2.1