[evince] [libview] Do nothing in size_allocate when document is not yet loaded



commit e33ec3d4af0b1e1877df50fb39d62a51f20ff275
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sun May 9 16:47:46 2010 +0200

    [libview] Do nothing in size_allocate when document is not yet loaded

 libview/ev-view.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 194361f..69f4bdd 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -2875,7 +2875,10 @@ ev_view_size_allocate (GtkWidget      *widget,
 	gint    root_x, root_y;
 
 	GTK_WIDGET_CLASS (ev_view_parent_class)->size_allocate (widget, allocation);
-	
+
+	if (!view->document)
+		return;
+
 	if (view->sizing_mode == EV_SIZING_FIT_WIDTH ||
 	    view->sizing_mode == EV_SIZING_BEST_FIT) {
 		GtkRequisition req;



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