[banshee/stable-2.4] AppleDevice: null check for MediaDatabase.PodcastPlaylist (bgo#679260)
- From: AndrÃs Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-2.4] AppleDevice: null check for MediaDatabase.PodcastPlaylist (bgo#679260)
- Date: Sun, 8 Jul 2012 15:41:33 +0000 (UTC)
commit 44fe5ef5401de733848e13bc7705d09ab290b8bf
Author: Andres G. Aragoneses <knocte gmail com>
Date: Sun Jul 8 16:38:34 2012 +0100
AppleDevice: null check for MediaDatabase.PodcastPlaylist (bgo#679260)
If invalid tracks are found in the iPod, they could be
marked as podcast without having a podcast playlist in
place, which would cause a NullReferenceException when
trying to remove them.
Fixes BGO#679260.
.../Banshee.Dap.AppleDevice/AppleDeviceSource.cs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
index 0070e70..051cb48 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
@@ -430,7 +430,9 @@ namespace Banshee.Dap.AppleDevice
playlist.Tracks.Remove (track);
}
- if (SupportsPodcasts && track.MediaType == GPod.MediaType.Podcast) {
+ if (SupportsPodcasts &&
+ track.MediaType == GPod.MediaType.Podcast &&
+ MediaDatabase.PodcastsPlaylist != null) {
MediaDatabase.PodcastsPlaylist.Tracks.Remove (track);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]