[gnome-music] lastfm: don't crash on unpausing
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] lastfm: don't crash on unpausing
- Date: Fri, 17 Jul 2015 13:41:28 +0000 (UTC)
commit da79900685b07f4aef2d185a9bf96dacf297d34f
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Fri Jul 17 15:41:16 2015 +0200
lastfm: don't crash on unpausing
gnomemusic/player.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index dc0e42a..82a868f 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -682,9 +682,10 @@ class Player(GObject.GObject):
self.player.set_state(Gst.State.PLAYING)
self._update_position_callback()
- t = Thread(target=self.update_now_playing_in_lastfm, args=(media.get_url(),))
- t.setDaemon(True)
- t.start()
+ if media:
+ t = Thread(target=self.update_now_playing_in_lastfm, args=(media.get_url(),))
+ t.setDaemon(True)
+ t.start()
if not self.timeout:
self.timeout = GLib.timeout_add(1000, self._update_position_callback)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]