summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2002-10-10 14:39:55 +0000
committerAlexander Larsson <alexl@src.gnome.org>2002-10-10 14:39:55 +0000
commitce2605956040dc8bf7ad18e6d6c6a247e4e5fdf4 (patch)
treea6b12c8da03726f3ef211c6ad69ba0212d5ad3ff
parent88e316d1b5756af6ec163877709fa166c5fed76a (diff)
downloadnautilus-ce2605956040dc8bf7ad18e6d6c6a247e4e5fdf4.tar.gz
If no preview pixmap found. ignore theme. Fixes crash for some crap theme
2002-10-10 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-theme.c (theme_list_prepend): If no preview pixmap found. ignore theme. Fixes crash for some crap theme i had installed.
-rw-r--r--ChangeLog5
-rw-r--r--libnautilus-private/nautilus-theme.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 43516a940..4382d38e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2002-10-10 Alexander Larsson <alexl@redhat.com>
+ * libnautilus-private/nautilus-theme.c (theme_list_prepend):
+ If no preview pixmap found. ignore theme. Fixes crash for some crap theme i had installed.
+
+2002-10-10 Alexander Larsson <alexl@redhat.com>
+
* libnautilus-private/nautilus-emblem-utils.c (nautilus_emblem_install_custom_emblem):
Touch the theme toplevel dir when finished installing emblem.
diff --git a/libnautilus-private/nautilus-theme.c b/libnautilus-private/nautilus-theme.c
index a098dcdee..2af13e256 100644
--- a/libnautilus-private/nautilus-theme.c
+++ b/libnautilus-private/nautilus-theme.c
@@ -491,11 +491,16 @@ theme_list_prepend (GList *theme_list,
g_return_val_if_fail (theme_name != NULL, NULL);
g_return_val_if_fail (themes_location_uri != NULL, NULL);
+ unscaled_preview_pixbuf = nautilus_theme_make_preview_pixbuf (theme_name);
+
+ if (unscaled_preview_pixbuf == NULL) {
+ return theme_list;
+ }
+
attributes = g_new0 (ThemeAttibutes, 1);
attributes->name = g_strdup (theme_name);
attributes->path = g_build_filename (themes_location_uri, theme_name, NULL);
- unscaled_preview_pixbuf = nautilus_theme_make_preview_pixbuf (theme_name);
attributes->preview_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (unscaled_preview_pixbuf,
THEME_PREVIEW_ICON_WIDTH,
THEME_PREVIEW_ICON_HEIGHT);