[banshee/stable-2.6] PrimarySource: fix crash if 1st track had a Dap transcoding error (bgo#700753)
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-2.6] PrimarySource: fix crash if 1st track had a Dap transcoding error (bgo#700753)
- Date: Wed, 22 May 2013 14:15:03 +0000 (UTC)
commit 8ce580af7aebc211d3653cb4eef1b0c73ba3c4e4
Author: Andres G. Aragoneses <knocte gmail com>
Date: Wed May 22 15:14:21 2013 +0100
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.
.../Banshee.Sources/PrimarySource.cs | 2 +-
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 a1250ec..2d637ec 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]