On 11/27/2010 04:37 PM, Bruno Dilly wrote:
> On Sat, Nov 27, 2010 at 7:05 PM, Bruno Dilly<[email protected]>  wrote:
>> On Sat, Nov 27, 2010 at 9:34 AM, Christopher Michael
>> <[email protected]>  wrote:
>>> What ?? You mean we cannot just pump out code in a hurry, not test it,
>>> and hope it works ?? Blasphemy I say !! ;)
>>>
>>> Nice catch :) Btw, what about
>>> elm_list_item_data_get(elm_list_selected_item_get()) ??? What happens
>>> there when nothing is selected in the elm_list ? ;)
>>
>> if nothing is selected elm_list_selected_item_get() returns NULL
>> so you'll have elm_list_item_data_get(NULL)
>>
>> Now every item function checks for item not being NULL and check
>> widtype (or at least should), so it will return NULL after this checks
>> using the macro ELM_WIDGET_ITEM_CHECK_OR_RETURN
>>
>> But I'm not going to check the code unless you explain me what is
>> going wrong, give me a test, a backtrace, something...
>>
>
> I realized you're talking about the usage on elementary config. In
> this case, if a list can have not selected items it really can go to a
> strcmp(X, NULL), but I'm not sure if it's possible to have a "no
> profile selected" situation. Anyway looks like the same approach is
> used on other lists, like themes, engines...
>
> glima, couldn't you verify if it's needed to add checks before these
> strcmps, please ? =)
>
>> Regards
>>

Yea, that's all I am saying here. What happens if 'selected' is null ?? 
There is potential for another segfault there...

dh


-- 
"If C gives you enough rope to hang yourself, then C++ gives you enough 
rope to bind and gag your neighborhood, rig the sails on a small ship, 
and still have enough rope to hang yourself from the yardarm"
- Anonymous quote from the The UNIX-HATERS Handbook

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to