diff options
author | Alexander Larsson <alexl@redhat.com> | 2002-10-10 14:39:55 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2002-10-10 14:39:55 +0000 |
commit | ce2605956040dc8bf7ad18e6d6c6a247e4e5fdf4 (patch) | |
tree | a6b12c8da03726f3ef211c6ad69ba0212d5ad3ff | |
parent | 88e316d1b5756af6ec163877709fa166c5fed76a (diff) | |
download | nautilus-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | libnautilus-private/nautilus-theme.c | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -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); |