billiob pushed a commit to branch master.

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

commit ede0abb24582519d0b0012cb6e5e239def5d5a83
Author: Boris Faure <bill...@gmail.com>
Date:   Sat Aug 29 15:23:50 2015 +0200

    fix tab selector segfault
    
    Thanks to Yomi for the help in finding this
---
 src/bin/win.c | 6 ++++--
 1 file 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);
      }

-- 


Reply via email to