diff options
Diffstat (limited to 'gweled-fix-librsvg-segfault-v2.patch')
-rw-r--r-- | gweled-fix-librsvg-segfault-v2.patch | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/gweled-fix-librsvg-segfault-v2.patch b/gweled-fix-librsvg-segfault-v2.patch deleted file mode 100644 index 5a36bcdb1d8f..000000000000 --- a/gweled-fix-librsvg-segfault-v2.patch +++ /dev/null @@ -1,50 +0,0 @@ -=== modified file 'src/sge_utils.c' ---- src/sge_utils.c 2011-08-01 21:29:27 +0000 -+++ src/sge_utils.c 2018-02-05 07:39:25 +0000 -@@ -18,6 +18,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+#include <gio/gio.h> - #include <gtk/gtk.h> - #include <librsvg/rsvg.h> - -@@ -30,7 +31,8 @@ - { - gchar *full_pathname; - GdkPixbuf *pixbuf = NULL; -- GError *error; -+ GError *error = NULL; -+ GFile *file; - - full_pathname = g_strconcat(DATADIR "/pixmaps/", - filename, -@@ -38,13 +40,25 @@ - if (g_file_test(full_pathname, G_FILE_TEST_IS_REGULAR)) { - pixbuf = rsvg_pixbuf_from_file_at_size (full_pathname, width, - height, &error); -- g_free (full_pathname); -+ if (pixbuf == NULL) { -+ // Some versions of librsvg need URI instead of path. -+ // https://gitlab.gnome.org/GNOME/librsvg/issues/198 -+ g_clear_error (&error); -+ file = g_file_new_for_path (full_pathname); -+ g_free (full_pathname); -+ full_pathname = g_file_get_uri (file); -+ g_object_unref (file); -+ pixbuf = rsvg_pixbuf_from_file_at_size (full_pathname, width, -+ height, &error); -+ } - if (pixbuf == NULL) -- g_free (error); -+ g_error_free (error); - - } else - g_warning ("%s not found", filename); - -+ g_free (full_pathname); -+ - return pixbuf; - } - - |