Guard against invalid colours. Closes LP#943251
This commit is contained in:
parent
c7b859487c
commit
4b4b8cce9a
|
@ -367,6 +367,10 @@ class PrefsEditor:
|
|||
widget.set_active(self.config['cursor_blink'])
|
||||
# Cursor colour
|
||||
widget = guiget('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
|
||||
|
|
Loading…
Reference in New Issue