[gnome-music] widgets: Fix IndexError when a user cancels new playlist dialog
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] widgets: Fix IndexError when a user cancels new playlist dialog
- Date: Tue, 6 Jan 2015 17:06:55 +0000 (UTC)
commit 8e17c6c389a16a57397d7943c2fa93cea4c3c2a9
Author: Sagar Ghuge <ghugesss gmail com>
Date: Fri Jan 2 15:37:27 2015 +0530
widgets: Fix IndexError when a user cancels new playlist dialog
https://bugzilla.gnome.org/show_bug.cgi?id=742123
gnomemusic/widgets.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index e9f0088..6f06eb2 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -743,7 +743,8 @@ class PlaylistDialog():
@log
def _on_playlist_created(self, playlists, item):
new_iter = self._add_item_to_model(item)
- self.view.set_cursor(self.model.get_path(new_iter),
- self.view.get_columns()[0], False)
- self.view.row_activated(self.model.get_path(new_iter),
- self.view.get_columns()[0])
+ if self.view.get_columns():
+ self.view.set_cursor(self.model.get_path(new_iter),
+ self.view.get_columns()[0], False)
+ self.view.row_activated(self.model.get_path(new_iter),
+ self.view.get_columns()[0])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]