summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-io.c')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 9642182a8c..cf3e8377b0 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -779,20 +779,22 @@ gdk_pixbuf_new_from_xpm_data (const char **data)
GdkPixbuf *(* load_xpm_data) (const char **data);
GdkPixbuf *pixbuf;
GError *error = NULL;
- GdkPixbufModule *xpm_module = _gdk_pixbuf_get_named_module ("xpm", NULL);
+ GdkPixbufModule *xpm_module = _gdk_pixbuf_get_named_module ("xpm", &error);
+ if (xpm_module == NULL) {
+ g_warning ("Error loading XPM image loader: %s", error->message);
+ g_error_free (error);
+ return NULL;
+ }
if (xpm_module->module == NULL) {
if (!_gdk_pixbuf_load_module (xpm_module, &error)) {
g_warning ("Error loading XPM image loader: %s", error->message);
g_error_free (error);
- return FALSE;
+ return NULL;
}
}
- if (xpm_module->module == NULL) {
- g_warning ("Can't find gdk-pixbuf module for parsing inline XPM data");
- return NULL;
- } else if (xpm_module->load_xpm_data == NULL) {
+ if (xpm_module->load_xpm_data == NULL) {
g_warning ("gdk-pixbuf XPM module lacks XPM data capability");
return NULL;
} else