Handle selection of None correctly

This commit is contained in:
simon.kagstrom 2010-02-09 19:08:16 +00:00
parent 171e274b9a
commit bf0d8c5e90

View File

@ -36,7 +36,11 @@ public:
virtual void selectCallback(int which)
{
char *p = xstrdup(this->pp_msgs[this->cur_sel]);
const char *msg = this->pp_msgs[this->cur_sel];
if (strcmp(msg, "None") != 0)
{
char *p = xstrdup(msg);
p[strlen(p) - 1] = '\0';
if (!Gui::gui->setTheme(p + 1))
@ -46,6 +50,7 @@ public:
Gui::gui->pushDialogueBox(new DialogueBox(broken_theme_dlg));
}
free(p);
}
Gui::gui->popView();
}