widget: Fix eo resolve error 69/173869/2
authorSubodhKumar <s7158.kumar@samsung.com>
Mon, 26 Mar 2018 12:27:36 +0000 (17:57 +0530)
committerYoungbok Shin <youngb.shin@samsung.com>
Mon, 2 Apr 2018 05:33:22 +0000 (05:33 +0000)
If the parent of the widget is not an widget class itself,
eo thows error. In case of  window which has no widget as parent gives this error.

@tizen_fix

Change-Id: I1f69447f5a24d1b580ec5cdb16fc0036cc0f6da9
Signed-off-by: SubodhKumar <s7158.kumar@samsung.com>
src/lib/elm_widget.c

index 85a6782..562bce2 100644 (file)
@@ -6288,11 +6288,14 @@ _elm_widget_eo_base_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
    eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_UNKNOWN));
 
    /* TIZEN_ONLY(20161117): Inherit paragraph direction from widget parent */
-   if (sd->paragraph_direction != evas_object_paragraph_direction_get(parent))
+   if (eo_isa(parent, ELM_WIDGET_CLASS))
      {
-        sd->paragraph_direction = evas_object_paragraph_direction_get(parent);
-        _elm_widget_evas_object_paragraph_direction_set_internal(obj, sd, sd->paragraph_direction);
-        eo_do_super(obj, MY_CLASS, evas_obj_paragraph_direction_set(sd->paragraph_direction));
+        if (sd->paragraph_direction != evas_object_paragraph_direction_get(parent))
+          {
+             sd->paragraph_direction = evas_object_paragraph_direction_get(parent);
+             _elm_widget_evas_object_paragraph_direction_set_internal(obj, sd, sd->paragraph_direction);
+             eo_do_super(obj, MY_CLASS, evas_obj_paragraph_direction_set(sd->paragraph_direction));
+          }
      }
    /* END */