]> www.fi.muni.cz Git - evince.git/commitdiff
Add checks that are useful in the case of empty ps document.
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Thu, 16 Feb 2006 20:39:06 +0000 (20:39 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Thu, 16 Feb 2006 20:39:06 +0000 (20:39 +0000)
ChangeLog
ps/ps-document.c

index 0260f5810c803b791ab5808611b07375dfe356c5..6aabd54cd18ea5b0a2489de2308414a9217ef4c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
+2006-02-16  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * ps/ps-document.c: (push_pixbuf), (setup_pixmap):
+       
+       Add checks that have sense for empty ps document.
+
 2006-02-15  Luca Ferretti <elle.uca@libero.it>
 
-       * configure.ac: Include PS in mime types
-       list. 
+       * configure.ac: Include PS in mime types list. 
 
 2006-02-13  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
index 75009dc9844f54c4ed8ef6ede8240c26a19d36f9..2fabd2613347e094508b0a2a836b75839bc7e171 100644 (file)
@@ -210,6 +210,9 @@ push_pixbuf (PSDocument *gs)
        GdkColormap *cmap;
        GdkPixbuf *pixbuf;
        int width, height;
+       
+       if (gs->pstarget == NULL)
+               return;
 
        cmap = gdk_window_get_colormap (gs->pstarget);
        gdk_drawable_get_size (gs->bpixmap, &width, &height);
@@ -311,6 +314,9 @@ setup_pixmap (PSDocument *gs, int page, double scale, int rotation)
        GdkColormap *colormap;
        double width, height;
        int pixmap_width, pixmap_height;
+       
+       if (gs->pstarget == NULL)
+               return;
 
        ev_document_get_page_size (EV_DOCUMENT (gs), page, &width, &height);