+2003-01-03 Matthias Clasen <maclas@gmx.de>
+
+ * gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Don't crash if
+ gdk-pixbuf.loaders file is missing. (#102222)
+
2002-12-08 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-animation.h:
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