[evince] Refresh thumbnail only when window has a document



commit 1b5cf706867e17913682044dda775dd725edf24e
Author: Hib Eris <hib hiberis nl>
Date:   Mon Jul 25 16:06:40 2011 +0200

    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.

 shell/ev-window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 2c9568f..95ae4ed 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1388,7 +1388,7 @@ ev_window_refresh_window_thumbnail (EvWindow *ev_window)
 	gint rotation;
 	EvDocument *document = ev_window->priv->document;
 
-	if (ev_document_get_n_pages (document) <= 0 ||
+	if (!document || ev_document_get_n_pages (document) <= 0 ||
 	    !ev_document_check_dimensions (document)) {
 		return;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]