Guard against invalid colours. Closes LP#943251
This commit is contained in:
parent
c7b859487c
commit
4b4b8cce9a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue