From 5c7efc5687bd6ea2367f93fe984bc9ac7f20360a Mon Sep 17 00:00:00 2001 From: zmike Date: Mon, 20 Jan 2014 13:25:37 -0500 Subject: [PATCH] prefs should CRI on add/file_set if init has failed --- src/lib/elm_prefs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c index d03268a55..7203f8dab 100644 --- a/src/lib/elm_prefs.c +++ b/src/lib/elm_prefs.c @@ -516,7 +516,7 @@ elm_prefs_add(Evas_Object *parent) if (!_elm_prefs_init_count) { - ERR("prefs_iface module is not loaded! you can't" + CRI("prefs_iface module is not loaded! you can't" " create prefs widgets"); return NULL; } @@ -1160,6 +1160,13 @@ _elm_prefs_file_set(Eo *obj, void *_pd, va_list *list) Elm_Prefs_Smart_Data *sd = _pd; + if (!_elm_prefs_init_count) + { + CRI("prefs_iface module is not loaded! you can't" + " create prefs widgets"); + *ret = EINA_FALSE; + return; + } prefix = elm_app_data_dir_get(); if (!strlen(prefix)) { -- 2.34.1