From 2ff5fc7b72878709ebcecd36ded7358b6fe09d44 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 19 Sep 2003 16:13:33 +0000 Subject: [PATCH] do not rely on librsvg setting GError on failure, it doesn't :( 2003-09-19 Sven Neumann * plug-ins/common/svg.c (load_image): do not rely on librsvg setting GError on failure, it doesn't :( --- ChangeLog | 5 +++++ plug-ins/common/svg.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2b3919183a..5a4c30134f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-09-19 Sven Neumann + + * plug-ins/common/svg.c (load_image): do not rely on librsvg + setting GError on failure, it doesn't :( + 2003-09-19 Michael Natterer * app/gui/gui.c (gui_device_change_notify): session_info->widget diff --git a/plug-ins/common/svg.c b/plug-ins/common/svg.c index b2f2f32f98..c40def15a9 100644 --- a/plug-ins/common/svg.c +++ b/plug-ins/common/svg.c @@ -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 (); }