]> www.fi.muni.cz Git - evince.git/commitdiff
[libview] Do nothing in size_allocate when document is not yet loaded
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 9 May 2010 14:47:46 +0000 (16:47 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 10 May 2010 11:55:15 +0000 (13:55 +0200)
libview/ev-view.c

index 2b757b85f636cef6c1b44c08819ef198e6e10676..5b6e4cab529e6f5365cda50e24669725e3cdb353 100644 (file)
@@ -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;