Guard against invalid colours. Closes LP#943251

This commit is contained in:
Chris Jones 2012-03-06 09:19:52 +00:00
parent c7b859487c
commit 4b4b8cce9a

View File

@ -367,7 +367,11 @@ class PrefsEditor:
widget.set_active(self.config['cursor_blink'])
# Cursor colour
widget = guiget('cursor_color')
widget.set_color(gtk.gdk.Color(self.config['cursor_color']))
try:
widget.set_color(gtk.gdk.Color(self.config['cursor_color']))
except ValueError:
self.config['cursor_color'] = "#FFFFFF"
widget.set_color(gtk.gdk.Color(self.config['cursor_color']))
## Command tab
# Login shell