On 12/19/2010 11:06 PM, Mike Blumenkrantz wrote:
> On Sun, 19 Dec 2010 13:36:28 -0800
> "Enlightenment SVN"<no-re...@enlightenment.org>  wrote:
>
>> Log:
>> fixes a segv when trying to add systray gadget to desktop; someone who knows
>> gadman module please review!
>>
>> Author:       discomfitor
>> Date:         2010-12-19 13:36:27 -0800 (Sun, 19 Dec 2010)
>> New Revision: 55647
>> Trac:         http://trac.enlightenment.org/e/changeset/55647
>>
>> Modified:
>>    trunk/e/src/modules/gadman/e_mod_config.c
>>
>> Modified: trunk/e/src/modules/gadman/e_mod_config.c
>> ===================================================================
>> --- trunk/e/src/modules/gadman/e_mod_config.c        2010-12-19 19:19:33 UTC
>> (rev 55646) +++ trunk/e/src/modules/gadman/e_mod_config.c    2010-12-19
>> 21:36:27 UTC (rev 55647) @@ -333,7 +333,7 @@
>>           if (!cc) continue;
>>
>>           gcc = gadman_gadget_add(cc, GADMAN_LAYER_BG);
>> -        gadman_gadget_edit_start(gcc);
>> +        if (gcc) gadman_gadget_edit_start(gcc);
>>        }
>>
>>      if (l) eina_list_free(l);
>>
>>
>> ------------------------------------------------------------------------------
>> Lotusphere 2011
>> Register now for Lotusphere 2011 and learn how
>> to connect the dots, take your collaborative environment
>> to the next level, and enter the era of Social Business.
>> http://p.sf.net/sfu/lotusphere-d2d
>> _______________________________________________
>> enlightenment-svn mailing list
>> enlightenment-...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> I don't know the module so I don't know how to debug it, but this prevents a
> crash which occurs while trying to add a gadget to desktop (I used systray to
> cause the bug, but probably all of them work?).  Currently, all this does is
> avoid the crash; the gadget will not be added.  This is obviously not the 
> right
> fix, but at least it won't crash all over :)
>

It is the right fix. gadman_gadget_add() might fail, so the error must 
be trapped.

S.

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to