Commit 12a08885 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't crash if gdk-pixbuf.loaders file is missing. (#102222)

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)
parent 59c27f2b
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:
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment