summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorBjörn Lindqvist <bjourne@gmail.com>2008-03-23 18:27:03 +0000
committerBjörn Lindqvist <bjornl@src.gnome.org>2008-03-23 18:27:03 +0000
commit8fce9eab79ba5e61927436bf78803c95b172fbb6 (patch)
treec3c471977027ab39a6843198efb6b6d961261f01 /gdk-pixbuf
parentca2987a0f9afd0ea261d621e340ceacd232089c6 (diff)
downloadgtk+-8fce9eab79ba5e61927436bf78803c95b172fbb6.tar.gz
Guard against NULL pointer. (#467051, Gian Mario Tagliaretti)
2008-03-23 Björn Lindqvist <bjourne@gmail.com> * gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Guard against NULL pointer. (#467051, Gian Mario Tagliaretti) svn path=/trunk/; revision=19929
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 9214ce4cd6..5a6f598503 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -1497,6 +1497,8 @@ gdk_pixbuf_new_from_xpm_data (const char **data)
GdkPixbufModule *xpm_module;
gboolean locked;
+ g_return_val_if_fail (data != NULL, NULL);
+
xpm_module = _gdk_pixbuf_get_named_module ("xpm", &error);
if (xpm_module == NULL) {
g_warning ("Error loading XPM image loader: %s", error->message);