aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-08-10 20:57:10 +0200
committerBoris Faure <billiob@gmail.com>2015-08-10 21:02:27 +0200
commit69cffca8b028c20e2c87944dfc5e36eaae77baec (patch)
treede778e049dbafed9ed7bf066269bd8d5491d4525 /src/bin/win.c
parentcorrectly fix coverity issue found in termiolink.c (diff)
downloadterminology-69cffca8b028c20e2c87944dfc5e36eaae77baec.tar.gz
fix splitting when no term focused. oops
Diffstat (limited to 'src/bin/win.c')
-rw-r--r--src/bin/win.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 8bd625e..dc79fbf 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -951,7 +951,7 @@ _win_split(Term_Container *tc, Term_Container *child, const char *cmd,
Evas_Object *o;
tm = tc->focused_term_get(tc);
- if (termio_cwd_get(tm->termio, buf, sizeof(buf)))
+ if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
wdir = buf;
tm_new = term_new(wn, wn->config,
cmd, wn->config->login_shell, wdir,
@@ -1429,7 +1429,7 @@ _split_split(Term_Container *tc, Term_Container *child,
Evas_Object *obj_split;
tm = child->focused_term_get(child);
- if (termio_cwd_get(tm->termio, buf, sizeof(buf)))
+ if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
wdir = buf;
tm_new = term_new(wn, wn->config,
cmd, wn->config->login_shell, wdir,