[banshee] [MediaEngine] Fix recently introduced NRE (bgo#633404)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [MediaEngine] Fix recently introduced NRE (bgo#633404)
- Date: Thu, 28 Oct 2010 21:31:18 +0000 (UTC)
commit 964f6719d2c6fcd687eabb6ecb1d4c1b19246ed9
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Oct 28 16:30:00 2010 -0500
[MediaEngine] Fix recently introduced NRE (bgo#633404)
.../Banshee.MediaEngine/PlayerEngine.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs b/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs
index 99d98ff..343f3e6 100644
--- a/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs
+++ b/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs
@@ -107,7 +107,7 @@ namespace Banshee.MediaEngine
if (current_state != PlayerState.Playing) {
// Pre-buffering the next track only makes sense when we're currently playing
// Instead, just open.
- if (track.Uri != null) {
+ if (track != null && track.Uri != null) {
HandleOpen (track);
Play ();
}
@@ -116,7 +116,7 @@ namespace Banshee.MediaEngine
try {
// Setting the next track doesn't change the player state.
- SetNextTrackUri (track.Uri);
+ SetNextTrackUri (track == null ? null : track.Uri);
} catch (Exception e) {
Log.Exception ("Failed to pre-buffer next track", e);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]