elm/colorselector: return early from theme apply if object is not yet finalized
authorMike Blumenkrantz <zmike@samsung.com>
Wed, 29 May 2019 13:17:00 +0000 (09:17 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 3 Jun 2019 06:58:34 +0000 (15:58 +0900)
Summary:
the remainder of this function cannot be handled until objects are set up
later in construction

@fix
Depends on D8955

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8956

src/lib/elementary/elm_colorselector.c

index 6a9d742..1ad39c1 100644 (file)
@@ -1375,6 +1375,9 @@ _elm_colorselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd
    int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
    if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
 
+   /* none of the below objects are created before finalize */
+   if (!efl_finalized_get(obj)) return int_ret;
+
    if ((sd->mode == ELM_COLORSELECTOR_PALETTE) ||
        (sd->mode == ELM_COLORSELECTOR_ALL) ||
        (sd->mode == ELM_COLORSELECTOR_BOTH))