summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-directory-background.c
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2001-01-24 02:34:50 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2001-01-24 02:34:50 +0000
commit4d41b0bb00925db7549c8398fce559ba0e769931 (patch)
treeb20e9b4ebe3cc513a97adf2eb764fd43148c01e4 /libnautilus-private/nautilus-directory-background.c
parentaeb4b32c17e7c06c6a39c45f7db47cbcaea6debb (diff)
downloadnautilus-4d41b0bb00925db7549c8398fce559ba0e769931.tar.gz
fixed bug 5908, assert hit when background pattern is deleted, by testing
* libnautilus-extensions/nautilus-directory-background.c: (theme_image_path_to_uri): fixed bug 5908, assert hit when background pattern is deleted, by testing explicitly for the file missing and returning NULL in that case instead of asserting.
Diffstat (limited to 'libnautilus-private/nautilus-directory-background.c')
-rw-r--r--libnautilus-private/nautilus-directory-background.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-directory-background.c b/libnautilus-private/nautilus-directory-background.c
index 3ba12aa05..6fba69432 100644
--- a/libnautilus-private/nautilus-directory-background.c
+++ b/libnautilus-private/nautilus-directory-background.c
@@ -153,9 +153,12 @@ theme_image_path_to_uri (char *image_file, const char *theme_name)
image_path = g_strdup_printf ("%s/%s", NAUTILUS_DATADIR, image_file);
}
- g_assert (g_file_exists (image_path));
+ if (image_path && g_file_exists (image_path)) {
+ image_uri = gnome_vfs_get_uri_from_local_path (image_path);
+ } else {
+ image_uri = NULL;
+ }
- image_uri = gnome_vfs_get_uri_from_local_path (image_path);
g_free (image_path);
} else {
image_uri = g_strdup (image_file);