handle failure to termio_add()

This commit is contained in:
Boris Faure 2015-02-23 23:29:15 +01:00
parent 12ef99bcf2
commit ac12f8eec8
1 changed files with 7 additions and 0 deletions

View File

@ -2826,6 +2826,13 @@ term_new(Win *wn, Config *config, const char *cmd,
term->term = o = termio_add(wn->win, config, cmd, login_shell, cd,
size_w, size_h, term);
if (!term->term)
{
CRITICAL(_("Could not create termio widget."));
evas_object_del(term->bg);
free(term);
return NULL;
}
colors_term_init(termio_textgrid_get(term->term), term->bg, config);
termio_win_set(o, wn->win);