changeset 639:9d2c175e458e trunk

[svn] More skin-related fixups. One segfault fix by Michael Hanselmann and a fix by Daniel Drake to also display skins that lack a thumbnail.
author chainsaw
date Sat, 18 Feb 2006 14:02:57 -0800
parents 72ec4db929ed
children f26682a2825b
files audacious/skin.c audacious/skinwin.c
diffstat 2 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/skin.c	Sat Feb 18 13:21:21 2006 -0800
+++ b/audacious/skin.c	Sat Feb 18 14:02:57 2006 -0800
@@ -330,7 +330,7 @@
 
     memset(&basenames, 0, sizeof(basenames));
 
-    for (i = 0, y = 0; ext_targets[i]; i++, y++)
+    for (i = 0, y = 0; i < EXTENSION_TARGETS; i++, y++)
     {
         basenames[y] = g_strdup_printf("%s.%s", pixmap_id_mapping->name,
 			ext_targets[i]);
--- a/audacious/skinwin.c	Sat Feb 18 13:21:21 2006 -0800
+++ b/audacious/skinwin.c	Sat Feb 18 14:02:57 2006 -0800
@@ -281,9 +281,6 @@
     for (entry = skinlist; entry; entry = g_list_next(entry)) {
         thumbnail = skin_get_thumbnail(SKIN_NODE(entry->data)->path);
 
-        if (!thumbnail)
-            continue;
-
         formattedname = g_strdup_printf("<big><b>%s</b></big>\n<i>%s</i>",
 		SKIN_NODE(entry->data)->name, SKIN_NODE(entry->data)->desc);
         name = SKIN_NODE(entry->data)->name;
@@ -293,7 +290,8 @@
                            SKIN_VIEW_COL_PREVIEW, thumbnail,
                            SKIN_VIEW_COL_FORMATTEDNAME, formattedname,
                            SKIN_VIEW_COL_NAME, name, -1);
-        g_object_unref(thumbnail);
+        if (thumbnail)
+            g_object_unref(thumbnail);
         g_free(formattedname);
 
         if (g_strstr_len(bmp_active_skin->path,