do not rely on librsvg setting GError on failure, it doesn't :(

2003-09-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/svg.c (load_image): do not rely on librsvg
	setting GError on failure, it doesn't :(
This commit is contained in:
Sven Neumann 2003-09-19 16:13:33 +00:00 committed by Sven Neumann
parent 88f7280682
commit 2ff5fc7b72
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2003-09-19 Sven Neumann <sven@gimp.org>
* plug-ins/common/svg.c (load_image): do not rely on librsvg
setting GError on failure, it doesn't :(
2003-09-19 Michael Natterer <mitch@gimp.org>
* app/gui/gui.c (gui_device_change_notify): session_info->widget

View file

@ -215,6 +215,8 @@ load_rsvg_pixbuf (const gchar *filename,
if (!io)
return NULL;
g_io_channel_set_encoding (io, NULL, NULL);
handle = rsvg_handle_new ();
while (success && status != G_IO_STATUS_EOF)
@ -273,8 +275,10 @@ load_image (const gchar *filename)
pixbuf = load_rsvg_pixbuf (filename, &error);
if (!pixbuf)
{
/* Do not rely on librsvg setting GError on failure! */
g_message (_("Can't open '%s':\n"
"%s"), filename, error->message);
"%s"),
filename, error ? error->message : "unknown reason");
gimp_quit ();
}