[evince/gnome-2-30] [libview] Do nothing in size_allocate when document is not yet loaded



commit 26fe3006d2b239506f7747c6e52a14f082a67c2b
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 2b757b8..5b6e4ca 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -2873,7 +2873,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]