From 5b5012fadeee4350b100e0880c25094a6356ea39 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 15 Jan 2014 09:59:01 +0900 Subject: [PATCH] cnp - dont access null parent obj in getting xwin --- src/lib/elm_cnp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index ff03092..9febad7 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -1684,11 +1684,15 @@ _x11_drag_move(void *data EINA_UNUSED, Ecore_X_Xdnd_Position *pos) static Ecore_X_Window _x11_elm_widget_xwin_get(const Evas_Object *obj) { - Evas_Object *top; + Evas_Object *top, *par; Ecore_X_Window xwin = 0; top = elm_widget_top_get(obj); - if (!top) top = elm_widget_top_get(elm_widget_parent_widget_get(obj)); + if (!top) + { + par = elm_widget_parent_widget_get(obj); + if (par) top = elm_widget_top_get(par); + } if (top) xwin = elm_win_xwindow_get(top); if (!xwin) { -- 2.7.4