diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index 179d8bc28..cec9d0155 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,11 @@ +2004-07-15 Rodney Dawes + + * gnome-wp-item.c (gnome_wp_item_new): + Check that item->fileinfo is not NULL, before trying to use a + string variable inside the struct for a strncmp + + Fixes #147373 + 2004-06-28 Rodney Dawes * *.[ch]: Update copyright info to have correct years (2003-2004) diff --git a/capplets/background/gnome-wp-item.c b/capplets/background/gnome-wp-item.c index caf91a5e6..453947e99 100644 --- a/capplets/background/gnome-wp-item.c +++ b/capplets/background/gnome-wp-item.c @@ -53,7 +53,8 @@ GnomeWPItem * gnome_wp_item_new (const gchar * filename, item->pcolor = gdk_color_copy (&color1); item->scolor = gdk_color_copy (&color2); - if (!strncmp (item->fileinfo->mime_type, "image/", strlen ("image/"))) { + if (item->fileinfo != NULL && + !strncmp (item->fileinfo->mime_type, "image/", strlen ("image/"))) { if (item->name == NULL) { item->name = g_strdup (item->fileinfo->name); }