Bug#260197: PATCH: fix NULL filename assertions
Peter Moulder
Peter Moulder <pmoulder@bowman.csse.monash.edu.au>,
260197@bugs.debian.org
Mon, 19 Jul 2004 19:46:54 +1000
Package: gedit
Version: 2.6.1-1
Severity: minor
The attached patch is taken straight from gedit-2.7.1.
Consider upgrading gedit to >= 2.7.1 as an alternative
to applying this patch.
pjrm.
diff -dur gedit-2.6.1/gedit/recent-files/egg-recent-util.c gedit-2.7.1/gedit/recent-files/egg-recent-util.c
--- gedit-2.6.1/gedit/recent-files/egg-recent-util.c 2004-02-14 05:06:26.000000000 +1100
+++ gedit-2.7.1/gedit/recent-files/egg-recent-util.c 2004-06-26 00:47:02.000000000 +1000
@@ -53,6 +53,7 @@
return g_string_free (str, FALSE);
}
+#ifndef USE_STABLE_LIBGNOMEUI
static GdkPixbuf *
scale_icon (GdkPixbuf *pixbuf,
double *scale)
@@ -105,7 +106,6 @@
return pixbuf;
}
-#ifndef USE_STABLE_LIBGNOMEUI
GdkPixbuf *
egg_recent_util_get_icon (GnomeIconTheme *theme, const gchar *uri,
const gchar *mime_type, int size)
@@ -128,6 +128,10 @@
&base_size);
g_free (icon);
+ if (filename == NULL) {
+ return NULL;
+ }
+
pixbuf = load_icon_file (filename, base_size, size);
g_free (filename);