Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-02-16 20:39:06 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-02-16 20:39:06 (GMT)
commitd92011c16819e24fddc553b0192c629033e8c799 (patch)
tree588778d107c902920529bda86b7fd9c153f64ef4
parenta51b925a22d597db5ecca048f0b7913d5c64d6c6 (diff)
Add checks that are useful in the case of empty ps document.
-rw-r--r--ChangeLog9
-rw-r--r--ps/ps-document.c6
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0260f58..6aabd54 100644
--- 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>
diff --git a/ps/ps-document.c b/ps/ps-document.c
index 75009dc..2fabd26 100644
--- a/ps/ps-document.c
+++ b/ps/ps-document.c
@@ -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);