summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-08-29 15:23:50 +0200
committerBoris Faure <billiob@gmail.com>2015-08-29 15:23:50 +0200
commitede0abb24582519d0b0012cb6e5e239def5d5a83 (patch)
tree97d544095e1d57ce4ee4c6807a3869c5addef6e6 /src
parent2d2813087f569c27f7fe510e625300a20f645905 (diff)
fix tab selector segfault
Thanks to Yomi for the help in finding this
Diffstat (limited to 'src')
-rw-r--r--src/bin/win.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index dc79fbf..57fc55b 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1931,6 +1931,7 @@ _cb_tab_selector_show(Tabs *tabs, Tab_Item *to_item)
1931 1931
1932 is_selected = (tab_item == tabs->current); 1932 is_selected = (tab_item == tabs->current);
1933 missed_bell = term->missed_bell; 1933 missed_bell = term->missed_bell;
1934 tab_item->selector_entry = NULL;
1934 tab_item->selector_entry = sel_entry_add(tabs->selector, img, 1935 tab_item->selector_entry = sel_entry_add(tabs->selector, img,
1935 is_selected, 1936 is_selected,
1936 missed_bell, wn->config); 1937 missed_bell, wn->config);
@@ -2275,7 +2276,8 @@ _tabs_swallow(Term_Container *tc, Term_Container *orig,
2275 evas_object_image_source_set(img, 2276 evas_object_image_source_set(img,
2276 new_child->get_evas_object(new_child)); 2277 new_child->get_evas_object(new_child));
2277 evas_object_data_set(img, "tc", new_child); 2278 evas_object_data_set(img, "tc", new_child);
2278 sel_entry_update(tab_item->selector_entry); 2279 if (tab_item->selector_entry)
2280 sel_entry_update(tab_item->selector_entry);
2279 } 2281 }
2280 else if (tab_item != tabs->current) 2282 else if (tab_item != tabs->current)
2281 { 2283 {
@@ -2471,7 +2473,7 @@ _tabs_set_title(Term_Container *tc, Term_Container *child,
2471 assert(l); 2473 assert(l);
2472 tab_item = l->data; 2474 tab_item = l->data;
2473 2475
2474 if (tabs->selector) 2476 if (tabs->selector && tab_item->selector_entry)
2475 { 2477 {
2476 sel_entry_title_set(tab_item->selector_entry, title); 2478 sel_entry_title_set(tab_item->selector_entry, title);
2477 } 2479 }