Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv9979/src
Modified Files:
display_coverart.c
Log Message:
2007-05-16 P.G. Richardson <phantom_sf at users.sourceforge.net>
* display_coverart.c
Null checks placed in free_album.
g_hash_table_remove_all only used if running GLib version is
newer than 2.12.0.
Otherwise falls back on g_hash_table_foreach_remove.
Thanks to Mario Rossi for squashing these bugs.
Index: display_coverart.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display_coverart.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- display_coverart.c 13 May 2007 17:08:21 -0000 1.17
+++ display_coverart.c 16 May 2007 21:24:50 -0000 1.18
@@ -1217,10 +1217,14 @@
*/
static void free_album (Album_Item *album)
{
- g_list_free (album->tracks);
- g_free (album->albumname);
- g_free (album->artist);
- gdk_pixbuf_unref (album->albumart);
+ if (album != NULL)
+ {
+ g_list_free (album->tracks);
+ g_free (album->albumname);
+ g_free (album->artist);
+ if (album->albumart)
+ gdk_pixbuf_unref (album->albumart);
+ }
}
/**
@@ -1698,8 +1702,12 @@
tracks = playlist->members;
/* Free up the hash table and the key list */
- g_hash_table_remove_all (album_hash);
- g_list_free (album_key_list);
+ if (glib_check_version(2, 12, 0) == NULL)
+ g_hash_table_remove_all (album_hash);
+ else
+ g_hash_table_foreach_remove(album_hash, (GHRFunc)
gtk_true, NULL);
+
+ g_list_free (album_key_list);
album_key_list = NULL;;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2