summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-07-15 23:17:24 +0200
committerBoris Faure <billiob@gmail.com>2015-07-15 23:20:02 +0200
commit5db007e5798b7f8dd142ea365a6a1ce3333acf82 (patch)
tree5e04ca3cbe1e500b0365a07e3f6afa88d3b5ce3c /src
parent09b4fddf84ad2d106e7f038cde35ead33af47a2f (diff)
fix segv when spliting from controls. Closes T2568
Diffstat (limited to 'src')
-rw-r--r--src/bin/win.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 5094d69..a17643c 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -346,6 +346,9 @@ _solo_focus(Term_Container *tc, Term_Container *relative)
346 solo = (Solo*) tc; 346 solo = (Solo*) tc;
347 term = solo->term; 347 term = solo->term;
348 348
349 if (!tc->parent)
350 return;
351
349 DBG("tc:%p tc->is_focused:%d from_parent:%d", 352 DBG("tc:%p tc->is_focused:%d from_parent:%d",
350 tc, tc->is_focused, tc->parent == relative); 353 tc, tc->is_focused, tc->parent == relative);
351 if (tc->is_focused) 354 if (tc->is_focused)
@@ -1288,6 +1291,10 @@ _split_focus(Term_Container *tc, Term_Container *relative)
1288 1291
1289 DBG("tc:%p tc->is_focused:%d from_parent:%d", 1292 DBG("tc:%p tc->is_focused:%d from_parent:%d",
1290 tc, tc->is_focused, tc->parent == relative); 1293 tc, tc->is_focused, tc->parent == relative);
1294
1295 if (!tc->parent)
1296 return;
1297
1291 if (tc->parent == relative) 1298 if (tc->parent == relative)
1292 { 1299 {
1293 tc->is_focused = EINA_TRUE; 1300 tc->is_focused = EINA_TRUE;
@@ -1391,7 +1398,8 @@ _split_split(Term_Container *tc, Term_Container *child,
1391} 1398}
1392 1399
1393static Term_Container * 1400static Term_Container *
1394_split_new(Term_Container *tc1, Term_Container *tc2, Eina_Bool is_horizontal) 1401_split_new(Term_Container *tc1, Term_Container *tc2,
1402 Eina_Bool is_horizontal)
1395{ 1403{
1396 Evas_Object *o; 1404 Evas_Object *o;
1397 Term_Container *tc = NULL; 1405 Term_Container *tc = NULL;
@@ -2313,6 +2321,9 @@ _tabs_focus(Term_Container *tc, Term_Container *relative)
2313 assert (tc->type == TERM_CONTAINER_TYPE_TABS); 2321 assert (tc->type == TERM_CONTAINER_TYPE_TABS);
2314 tabs = (Tabs*) tc; 2322 tabs = (Tabs*) tc;
2315 2323
2324 if (!tc->parent)
2325 return;
2326
2316 DBG("tc:%p tc->is_focused:%d from_parent:%d", 2327 DBG("tc:%p tc->is_focused:%d from_parent:%d",
2317 tc, tc->is_focused, tc->parent == relative); 2328 tc, tc->is_focused, tc->parent == relative);
2318 if (tc->parent == relative) 2329 if (tc->parent == relative)
@@ -2360,6 +2371,8 @@ _tabs_unfocus(Term_Container *tc, Term_Container *relative)
2360 tc, tc->is_focused, tc->parent == relative); 2371 tc, tc->is_focused, tc->parent == relative);
2361 if (!tc->is_focused) 2372 if (!tc->is_focused)
2362 return; 2373 return;
2374 if (!tc->parent)
2375 return;
2363 2376
2364 assert (tc->type == TERM_CONTAINER_TYPE_TABS); 2377 assert (tc->type == TERM_CONTAINER_TYPE_TABS);
2365 tabs = (Tabs*) tc; 2378 tabs = (Tabs*) tc;