summaryrefslogtreecommitdiff
path: root/src
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
parentdb471aec09343db564362492b199e70c590fde81 (diff)
fix splitting when no term focused. oops
Diffstat (limited to 'src')
-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,
951 Evas_Object *o; 951 Evas_Object *o;
952 952
953 tm = tc->focused_term_get(tc); 953 tm = tc->focused_term_get(tc);
954 if (termio_cwd_get(tm->termio, buf, sizeof(buf))) 954 if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
955 wdir = buf; 955 wdir = buf;
956 tm_new = term_new(wn, wn->config, 956 tm_new = term_new(wn, wn->config,
957 cmd, wn->config->login_shell, wdir, 957 cmd, wn->config->login_shell, wdir,
@@ -1429,7 +1429,7 @@ _split_split(Term_Container *tc, Term_Container *child,
1429 Evas_Object *obj_split; 1429 Evas_Object *obj_split;
1430 1430
1431 tm = child->focused_term_get(child); 1431 tm = child->focused_term_get(child);
1432 if (termio_cwd_get(tm->termio, buf, sizeof(buf))) 1432 if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
1433 wdir = buf; 1433 wdir = buf;
1434 tm_new = term_new(wn, wn->config, 1434 tm_new = term_new(wn, wn->config,
1435 cmd, wn->config->login_shell, wdir, 1435 cmd, wn->config->login_shell, wdir,