[evince] view: Fix runtime critical warning



commit 44dd8d70007db2c4d216d08b4a40fdcb9adbb983
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sun Dec 23 13:22:48 2012 +0100

    view: Fix runtime critical warning
    
    Return early from ev_document_get_min_page_size() if the view doesn't
    have a document loaded.
    
    EvinceDocument-CRITICAL **: ev_document_get_min_page_size: assertion `EV_IS_DOCUMENT (document)' failed

 libview/ev-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 576b2a7..eb084c8 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4730,7 +4730,7 @@ view_update_scale_limits (EvView *view)
 	gint       rotation;
 	GdkScreen *screen;
 
-	if (!view->model)
+	if (!view->document)
 		return;
 
 	rotation = ev_document_model_get_rotation (view->model);



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