jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=15fd8149b4717caee3176a93824001af43b9b53f

commit 15fd8149b4717caee3176a93824001af43b9b53f
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Thu Dec 1 20:24:38 2016 +0900

    enventor_smart: Fix crash when focused item does not exist.
---
 src/lib/enventor_smart.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index d33cf88..cd8982c 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -446,6 +446,8 @@ _enventor_object_linenumber_set(Eo *obj EINA_UNUSED, 
Enventor_Object_Data *pd,
 
    if (pd->linenumber == linenumber) return;
 
+   if (!pd->focused_it) return;
+
    //Main Item
    edit_linenumber_set(pd->focused_it->ed, linenumber);
 
@@ -633,8 +635,10 @@ _enventor_object_part_highlight_set(Eo *obj EINA_UNUSED,
    if (pd->part_highlight == part_highlight) return;
    pd->part_highlight = part_highlight;
 
+   if (!pd->focused_it) return;
+
    //Main Item
-   if (part_highlight && pd->focused_it) edit_view_sync(pd->focused_it->ed);
+   if (part_highlight) edit_view_sync(pd->focused_it->ed);
    else view_part_highlight_set(VIEW_DATA, NULL);
 }
 
@@ -783,6 +787,7 @@ _enventor_object_disabled_set(Eo *obj EINA_UNUSED,
    disabled = !!disabled;
    if (pd->disabled == disabled) return;
 
+   if (!pd->focused_it) return;
    edit_disabled_set(pd->focused_it->ed, disabled);
 
    pd->disabled = !!disabled;
@@ -807,6 +812,7 @@ EOLIAN static void
 _enventor_object_keyword_reference_show(Eo *obj EINA_UNUSED,
                                         Enventor_Object_Data *pd)
 {
+   if (!pd->focused_it) return;
    ref_show(pd->focused_it->ed);
 }
 

-- 


Reply via email to