edje: add string "default" to a default description of the part being build.
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>
Mon, 4 Nov 2013 06:41:51 +0000 (15:41 +0900)
committerCedric Bail <cedric.bail@samsung.com>
Mon, 4 Nov 2013 06:41:54 +0000 (15:41 +0900)
Fix deffect with a missing tokken 'state' in the first description block when
generated by edje_cc (It is perfectly valid to not specify the first description
name as it will always be "default").

Reviewers: cedric, seoz

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
src/bin/edje/edje_cc_handlers.c

index 76cf7e1..88ab25e 100644 (file)
@@ -5043,6 +5043,7 @@ ob_collections_group_parts_part_description(void)
    if (!ep->default_desc)
      {
         current_desc = ep->default_desc = ed;
+        ed->state.name = strdup("default");
 
           {  /* Get the ptr of the part above current part in hierarchy */
              Edje_Part *node = edje_cc_handlers_hierarchy_parent_get();
@@ -5413,6 +5414,7 @@ st_collections_group_parts_part_description_state(void)
         exit(-1);
      }
 
+   free((void *)ed->state.name);
    ed->state.name = s;
    if (get_arg_count() == 1)
      ed->state.value = 0.0;