[tor-commits] [arm/master] fix: selecting a non-existant option crashed
atagar at torproject.org
atagar at torproject.org
Fri Aug 12 17:03:22 UTC 2011
commit 0964e3e0c1780f91935195d45120ecda3f556765
Author: Damian Johnson <atagar at torproject.org>
Date: Fri Aug 12 09:56:20 2011 -0700
fix: selecting a non-existant option crashed
When not attached to a tor instance there weren't any tor configuration options
available. If the user pressed 'enter' to edit an option this crashed arm.
---
src/cli/configPanel.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cli/configPanel.py b/src/cli/configPanel.py
index 2e8e1c1..bd9cba9 100644
--- a/src/cli/configPanel.py
+++ b/src/cli/configPanel.py
@@ -321,7 +321,7 @@ class ConfigPanel(panel.Panel):
isChanged = self.scroller.handleKey(key, self._getConfigOptions(), pageHeight)
if isChanged: self.redraw(True)
- elif uiTools.isSelectionKey(key):
+ elif uiTools.isSelectionKey(key) and self._getConfigOptions():
# Prompts the user to edit the selected configuration value. The
# interface is locked to prevent updates between setting the value
# and showing any errors.
More information about the tor-commits
mailing list