billiob pushed a commit to branch master.

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

commit f3bf486777dbd7b81a97d9e7b3f5ea3018c7bc25
Author: Boris Faure <[email protected]>
Date:   Wed Apr 29 22:53:02 2020 +0200

    win: handle early case when no child is present
---
 src/bin/win.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/win.c b/src/bin/win.c
index 878744c..ef3d395 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1272,7 +1272,7 @@ _win_focused_term_get(const Term_Container *tc)
 
    wn = (Win*) tc;
 
-   if (tc->is_focused)
+   if (tc->is_focused && wn->child)
      term = wn->child->focused_term_get(wn->child);
    return term;
 }
@@ -1286,6 +1286,9 @@ _win_find_term_at_coords(const Term_Container *tc,
 
    wn = (Win*) tc;
 
+   if (!wn->child)
+     return NULL;
+
    return wn->child->find_term_at_coords(wn->child, mx, my);
 }
 
@@ -1297,6 +1300,7 @@ _win_size_eval(Term_Container *tc, Sizeinfo *info)
 
    wn = (Win*) tc;
 
+   assert(wn->child);
    wn->child->size_eval(wn->child, info);
 }
 

-- 


Reply via email to