efl_ui_list: Add return value check 51/190051/2
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 27 Sep 2018 02:11:56 +0000 (11:11 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 27 Sep 2018 02:39:55 +0000 (02:39 +0000)
Summary:
efl_ui_layout_object_theme_set without checking return value.
so add return value check and log message.

Test Plan: N/A

Reviewers: SanghyeonLee, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl

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

Change-Id: I9b2a28f390ce6886384c8f0e3ae007fcf4d4f1a6

src/lib/elementary/efl_ui_list.c

index 272ef28..42ba8ae 100644 (file)
@@ -427,7 +427,9 @@ _efl_ui_list_efl_object_finalize(Eo *obj,
 
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
 
-   efl_ui_layout_object_theme_set(obj, "list", "base", efl_ui_widget_style_get(obj));
+   Efl_Ui_Theme_Apply theme_apply = efl_ui_layout_object_theme_set(obj, "list", "base", efl_ui_widget_style_get(obj));
+   if (theme_apply == EFL_UI_THEME_APPLY_FAILED)
+     CRI("list(%p) failed to set theme [efl/list:%s]!", obj, efl_ui_widget_style_get(obj) ?: "NULL");
 
    pd->smanager = efl_add(EFL_UI_SCROLL_MANAGER_CLASS, obj);
    efl_ui_mirrored_set(pd->smanager, efl_ui_mirrored_get(obj));