summaryrefslogtreecommitdiff
path: root/src/lib/gui_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/gui_widget.c')
-rw-r--r--src/lib/gui_widget.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index dcb171c..6306ef6 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -1394,8 +1394,11 @@ wdg_main_wdg_get(const Gui_Widget *wdg)
1394{ 1394{
1395 EINA_SAFETY_ON_NULL_RETURN_VAL(wdg, NULL); 1395 EINA_SAFETY_ON_NULL_RETURN_VAL(wdg, NULL);
1396 do { 1396 do {
1397 if (!wdg->parent_id)
1398 return wdg;
1397 const Gui_Widget *parent = wdg_parent_get(wdg); 1399 const Gui_Widget *parent = wdg_parent_get(wdg);
1398 if (!parent) return wdg; 1400 if (!parent)
1401 return NULL;
1399 else wdg = parent; 1402 else wdg = parent;
1400 } while (EINA_TRUE); 1403 } while (EINA_TRUE);
1401 return NULL; 1404 return NULL;