[PATCH] fix pixbuf_get_page_size with null parameters
- From: Jeff Muizelaar <jrmuizel nit ca>
- To: evince-list gnome org
- Subject: [PATCH] fix pixbuf_get_page_size with null parameters
- Date: Wed, 12 Jan 2005 16:09:37 -0500
Attached patch is really straight forward. The parameters to get_page
can be null, make sure we check before assigning.
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
Index: pixbuf/pixbuf-document.c
===================================================================
RCS file: /cvs/gnome/evince/pixbuf/pixbuf-document.c,v
retrieving revision 1.3
diff -u -p -r1.3 pixbuf-document.c
--- pixbuf/pixbuf-document.c 23 Dec 2004 03:09:00 -0000 1.3
+++ pixbuf/pixbuf-document.c 12 Jan 2005 21:01:52 -0000
@@ -130,8 +135,10 @@ pixbuf_document_get_page_size (EvDocumen
{
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]