rhythmbox r6001 - in trunk: . plugins/ipod



Author: teuf
Date: Sun Oct 26 19:50:08 2008
New Revision: 6001
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6001&view=rev

Log:
After delaying the addition of a track, don't blindly free the ItdbTrack

RbIpodDb is used to delay modifications of the ipod database while it's
marked as read-only. It's done with an Action datastructure which contains
all the information needed to perform the delayed action. This structure
then has to be freed. In the case of delayed addition of tracks to the
database, we were unconditionnally calling itdb_track_free on the content
of the Action, which should never happen. For now, I added a warning to catch
the cases when it's called with a non-NULL track, it can be removed when
we are more confident that the freeing isn't needed

Modified:
   trunk/ChangeLog
   trunk/plugins/ipod/rb-ipod-db.c

Modified: trunk/plugins/ipod/rb-ipod-db.c
==============================================================================
--- trunk/plugins/ipod/rb-ipod-db.c	(original)
+++ trunk/plugins/ipod/rb-ipod-db.c	Sun Oct 26 19:50:08 2008
@@ -255,7 +255,10 @@
 		g_object_unref (action->thumbnail_data.pixbuf);
 		break;
 	case RB_IPOD_ACTION_ADD_TRACK:
-		itdb_track_free (action->track);
+		if (action->track != NULL) {
+			g_warning ("non NULL Itdb_Track, shouldn't happen");
+			itdb_track_free (action->track);
+		}
 		break;
 	case RB_IPOD_ACTION_ADD_PLAYLIST:
 		/* Do nothing */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]