yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=e95d33ae464c6103a0977e70e0ce7dfd0803a79e

commit e95d33ae464c6103a0977e70e0ce7dfd0803a79e
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Wed Jul 1 16:13:17 2015 +0300

    Just fix another segfault
---
 src/bin/gui/editor.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index dce3086..c099ad2 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -2329,11 +2329,13 @@ _drop_target_pos(void *data, Eo *obj, Evas_Coord x, 
Evas_Coord y, Elm_Xdnd_Actio
    Gui_Widget *wdg = data;
    DnD_Info *di = NULL;
    Eo *wdg_eo = NULL;
-   double scale = gui_context_scale_get(_active_context_get());
+   Gui_Context *ctx = _active_context_get();
+   if (!ctx) return;
+   double scale = gui_context_scale_get(ctx);
    /* If wdg == NULL, then canvas is a drop target or we have a error.*/
    if (wdg)
      {
-        const Gui_Session *session = 
gui_context_editor_session_get(wdg_context_get(wdg));
+        const Gui_Session *session = gui_context_editor_session_get(ctx);
         di = wdg_data_get(wdg_main_wdg_get(wdg), EDITOR_DND_DATA);
         wdg_eo = session_eo_get(session, wdg);
         _wdg_border_draw(wdg, EINA_TRUE, BORDER_DROP_TARGET);

-- 


Reply via email to