[banshee] 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] PrimarySource: fix crash if 1st track had a Dap transcoding error (bgo#700753)
- Date: Wed, 22 May 2013 14:14:26 +0000 (UTC)
commit 0ad8c79e577858d1faa601179cb730016a0628ca
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 b96ccde..87f0b68 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]