Don't crash when given a invalid colour, reported by Felix Rosencrantz,

fix from Thomas Adam.
This commit is contained in:
nicm 2014-02-17 18:12:47 +00:00
parent 81db6bab91
commit 1e981f4c6d

View File

@ -307,10 +307,12 @@ cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq,
break; break;
case OPTIONS_TABLE_COLOUR: case OPTIONS_TABLE_COLOUR:
o = cmd_set_option_colour(self, cmdq, oe, oo, value); o = cmd_set_option_colour(self, cmdq, oe, oo, value);
if (o != NULL)
style_update_new(oo, o->name, oe->style); style_update_new(oo, o->name, oe->style);
break; break;
case OPTIONS_TABLE_ATTRIBUTES: case OPTIONS_TABLE_ATTRIBUTES:
o = cmd_set_option_attributes(self, cmdq, oe, oo, value); o = cmd_set_option_attributes(self, cmdq, oe, oo, value);
if (o != NULL)
style_update_new(oo, o->name, oe->style); style_update_new(oo, o->name, oe->style);
break; break;
case OPTIONS_TABLE_FLAG: case OPTIONS_TABLE_FLAG: