From ac12f8eec80a1d6c5f06a1f8f2096c618c77a06a Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Mon, 23 Feb 2015 23:29:15 +0100 Subject: [PATCH] handle failure to termio_add() --- src/bin/win.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/win.c b/src/bin/win.c index fbbaedf8..d07e4447 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -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);