]> www.fi.muni.cz Git - evince.git/commitdiff
check for NULL before assigning to width and height parameters
authorJeff Muizelaar <jrmuizel@nit.ca>
Thu, 13 Jan 2005 15:27:03 +0000 (15:27 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Thu, 13 Jan 2005 15:27:03 +0000 (15:27 +0000)
2005-01-12  Jeff Muizelaar  <jrmuizel@nit.ca>

        * pixbuf/pixbuf-document.c: (pixbuf_document_get_page_size):

        check for NULL before assigning to width and height parameters

ChangeLog
pixbuf/pixbuf-document.c

index 1f8c644f5e301dd696859ba672a5adb2ec2d316a..8b63524510db909d209ec5665f93646b42ae7b4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-12  Jeff Muizelaar  <jrmuizel@nit.ca>
+
+       * pixbuf/pixbuf-document.c: (pixbuf_document_get_page_size):
+       
+       check for NULL before assigning to width and height parameters
+
 2005-01-12  Jeff Muizelaar  <jeff@nit.ca>
 
        * pixbuf/pixbuf-document.c: (pixbuf_document_class_init),
index 843df3d267a3da0c9d925d5f9c62a584ee0d9161..f0c39976d72e9b902e7d048bfe58a77d808cc643 100644 (file)
@@ -135,8 +135,10 @@ pixbuf_document_get_page_size (EvDocument   *document,
 {
        PixbufDocument *pixbuf_document = PIXBUF_DOCUMENT (document);
 
-       *width = gdk_pixbuf_get_width (pixbuf_document->pixbuf);
-       *height = gdk_pixbuf_get_height (pixbuf_document->pixbuf);
+       if (width)
+               *width = gdk_pixbuf_get_width (pixbuf_document->pixbuf);
+       if (height)
+               *height = gdk_pixbuf_get_height (pixbuf_document->pixbuf);
 }
 
 static void