Page MenuHomePhabricator

edje_color_class_set is broken
Closed, ResolvedPublic


The legacy function edje_color_class_set() do not work anymore after commit b543f4c89.

The problem is that the global _edje_color_class_hash is never created, it's always NULL.

The following patch fix the issue but I'm not really sure I put the hash creation in the right place

diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 3a4291b..3335e12 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -815,6 +815,9 @@ _edje_object_global_color_class_set(Eo_Class *klass EINA_UNUSED, void *pd EINA_U
    Eina_Bool int_ret;
    Eina_Bool need_update = EINA_FALSE;
+   if (!_edje_color_class_hash)
+     _edje_color_class_hash = eina_hash_string_superfast_new(NULL);
    int_ret = _edje_color_class_set_internal(_edje_color_class_hash, color_class, mode, r, g, b, a, &need_update);
    if ((int_ret) && (need_update))
DaveMDS created this task.Aug 2 2016, 9:56 AM
cedric closed this task as Resolved.Aug 2 2016, 5:42 PM
cedric added a subscriber: cedric.

Seems correct to me. Just pushed it as 7c01254ba79afcca4d02b16fd2841819c6acf2b4. Please use differential for patch.