Fixed in svn now as per your suggestion. I kept the return of edje_object_part_text_get just in case....better to be safe than sorry :)
Thanks :) dh On 04/02/2010 04:40 AM, Cedric BAIL wrote: > On Thu, Apr 1, 2010 at 8:48 PM, Enlightenment SVN > <no-re...@enlightenment.org> wrote: >> Log: >> Use item->label in places where we can. I don't know how this was >> overlooked all this time. This fixes a bug where getting item->label >> was always returning NULL. >> >> Can someone please check the eina_stringshare usage here ? Thanks :) >> >> @@ -571,7 +589,11 @@ >> if (sd->multi_select) return NULL; >> if (sd->selected< 0) return NULL; >> si = eina_list_nth(sd->items, sd->selected); >> - if (si) return edje_object_part_text_get(si->o_base, "e.text.label"); >> + if (si) >> + { >> + if (si->label) return si->label; >> + return edje_object_part_text_get(si->o_base, "e.text.label"); >> + } >> return NULL; >> } > > Don't return edje_object_part_text_get as it is not a stringshare. If > si->label is not set, perhaps do an si->label = > eina_stringshare_add(edje_object_part_text_get(si->o_base, > "e.text.label"));. But I don't see why in your code, you will have > si->label == NULL and e.text.label != NULL. So perhaps just drop that > return at all. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel