[gnome-music/gnome-3-12] playlist: fix a crash for item remove and no track playing
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/gnome-3-12] playlist: fix a crash for item remove and no track playing
- Date: Tue, 15 Apr 2014 11:32:41 +0000 (UTC)
commit 6275a31c9b02c0137073d34c525ecb8b8cb7877c
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Tue Apr 15 13:31:23 2014 +0200
playlist: fix a crash for item remove and no track playing
gnomemusic/view.py | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 558d00c..6d4f742 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -1135,11 +1135,10 @@ class Playlist(ViewContainer):
if row[5].get_url() == uri:
# Is the removed track now being played?
if name == self.current_playlist:
- currentTrackpath = self.player.currentTrack.get_path().to_string()
- logger.debug("row.path=%s", row.path)
- logger.debug("currentTrackpath=%s", currentTrackpath)
- if row.path is not None and row.path.to_string() == currentTrackpath:
- update_playing_track = True
+ if self.player.currentTrack is not None:
+ currentTrackpath = self.player.currentTrack.get_path().to_string()
+ if row.path is not None and row.path.to_string() == currentTrackpath:
+ update_playing_track = True
model.remove(row.iter)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]