summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres G. Aragoneses <knocte@gmail.com>2013-05-22 15:14:21 +0100
committerAndres G. Aragoneses <knocte@gmail.com>2013-05-22 15:14:21 +0100
commit0ad8c79e577858d1faa601179cb730016a0628ca (patch)
treeb62de385e9a4101236f32b0a048c93d8f29d9b32
parentd4fbe62ad024083739c07b4f7c7d75037fba7a14 (diff)
PrimarySource: fix crash if 1st track had a Dap transcoding error (bgo#700753)
The method IncrementAddedTracks() was accessing the field add_track_job, which would make Banshee crash with a NullReferenceException. By judging from the stack trace that the user supplied, this was likely to happen only if the very 1st track being transferred through Dap had a transcoding error (otherwise the code flow would access a method which initializes add_track_job if it is null). By using the property AddTrackJob instead of the field add_track_job, we make this method capable of initializing the field too in case it's reached the first when Dap transfer happens.
-rw-r--r--src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs b/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
index b96ccde61..87f0b6805 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
@@ -663,7 +663,7 @@ namespace Banshee.Sources
bool finished = false, notify = false;
lock (this) {
- add_track_job.Completed++;
+ AddTrackJob.Completed++;
if (add_track_job.IsFinished) {
finished = true;