billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=69cffca8b028c20e2c87944dfc5e36eaae77baec

commit 69cffca8b028c20e2c87944dfc5e36eaae77baec
Author: Boris Faure <bill...@gmail.com>
Date:   Mon Aug 10 20:57:10 2015 +0200

    fix splitting when no term focused. oops
---
 src/bin/win.c | 4 ++--
 1 file 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,

-- 


Reply via email to