aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
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/bin/win.c
parentUpdating italian translation (diff)
downloadterminology-ede0abb24582519d0b0012cb6e5e239def5d5a83.tar.gz
fix tab selector segfault
Thanks to Yomi for the help in finding this
Diffstat (limited to 'src/bin/win.c')
-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)
is_selected = (tab_item == tabs->current);
missed_bell = term->missed_bell;
+ tab_item->selector_entry = NULL;
tab_item->selector_entry = sel_entry_add(tabs->selector, img,
is_selected,
missed_bell, wn->config);
@@ -2275,7 +2276,8 @@ _tabs_swallow(Term_Container *tc, Term_Container *orig,
evas_object_image_source_set(img,
new_child->get_evas_object(new_child));
evas_object_data_set(img, "tc", new_child);
- sel_entry_update(tab_item->selector_entry);
+ if (tab_item->selector_entry)
+ sel_entry_update(tab_item->selector_entry);
}
else if (tab_item != tabs->current)
{
@@ -2471,7 +2473,7 @@ _tabs_set_title(Term_Container *tc, Term_Container *child,
assert(l);
tab_item = l->data;
- if (tabs->selector)
+ if (tabs->selector && tab_item->selector_entry)
{
sel_entry_title_set(tab_item->selector_entry, title);
}