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'])
|
widget.set_active(self.config['cursor_blink'])
|
||||||
# Cursor colour
|
# Cursor colour
|
||||||
widget = guiget('cursor_color')
|
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
|
## Command tab
|
||||||
# Login shell
|
# Login shell
|
||||||
|
|
Loading…
Reference in New Issue