summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-07-06 00:08:43 +0200
committermathieui <mathieui@mathieui.net>2014-07-06 00:08:43 +0200
commitcfd344edc3493b2db804a4eb5efda49e754fb1ed (patch)
tree05880a3263d842fa01ff6609bc52141c7d2a27bd /src
parent390bb8e2b41f9bb66e0cee8f7329ba889cce8a2f (diff)
downloadpoezio-cfd344edc3493b2db804a4eb5efda49e754fb1ed.tar.gz
poezio-cfd344edc3493b2db804a4eb5efda49e754fb1ed.tar.bz2
poezio-cfd344edc3493b2db804a4eb5efda49e754fb1ed.tar.xz
poezio-cfd344edc3493b2db804a4eb5efda49e754fb1ed.zip
Fix #2537 (crash on adhoc tab without items)
Diffstat (limited to 'src')
-rw-r--r--src/tabs/adhoc_commands_list.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tabs/adhoc_commands_list.py b/src/tabs/adhoc_commands_list.py
index 76cd941a..87ee0c52 100644
--- a/src/tabs/adhoc_commands_list.py
+++ b/src/tabs/adhoc_commands_list.py
@@ -25,6 +25,8 @@ class AdhocCommandsListTab(ListTab):
self.key_func['^M'] = self.execute_selected_command
def execute_selected_command(self):
+ if not self.listview or not self.listview.get_selected_row():
+ return
node, name, jid = self.listview.get_selected_row()
session = {'next': self.core.on_next_adhoc_step,
'error': self.core.on_adhoc_error}