On Mon, Jun 7, 2010 at 10:43 AM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
>  oops - forgot to return CALLBACK_CANCEL on elm_clock
>
>
> Author:       bdilly
> Date:         2010-06-07 06:43:07 -0700 (Mon, 07 Jun 2010)
> New Revision: 49553
>
> Modified:
>  trunk/TMP/st/elementary/src/lib/elm_clock.c
>
> Modified: trunk/TMP/st/elementary/src/lib/elm_clock.c
> ===================================================================
> --- trunk/TMP/st/elementary/src/lib/elm_clock.c 2010-06-07 13:08:19 UTC (rev 
> 49552)
> +++ trunk/TMP/st/elementary/src/lib/elm_clock.c 2010-06-07 13:43:07 UTC (rev 
> 49553)
> @@ -115,9 +115,9 @@
>  _signal_clock_val_up(void *data)
>  {
>    Widget_Data *wd = elm_widget_data_get(data);
> -   if (!wd) return;
> -   if (!wd->edit) return;
> -   if (!wd->sel_obj) return;
> +   if (!wd) return ECORE_CALLBACK_CANCEL;
> +   if (!wd->edit) return ECORE_CALLBACK_CANCEL;
> +   if (!wd->sel_obj) return ECORE_CALLBACK_CANCEL;
>    if (wd->sel_obj == wd->digit[0])
>      {
>        wd->hrs = wd->hrs + 10;
> @@ -164,9 +164,9 @@
>  _signal_clock_val_down(void *data)
>  {
>    Widget_Data *wd = elm_widget_data_get(data);
> -   if (!wd) return;
> -   if (!wd->edit) return;
> -   if (!wd->sel_obj) return;
> +   if (!wd) return ECORE_CALLBACK_CANCEL;
> +   if (!wd->edit) return ECORE_CALLBACK_CANCEL;
> +   if (!wd->sel_obj) return ECORE_CALLBACK_CANCEL;

I did not look this code in depth, but if you return
ECORE_CALLBACK_CANCEL (or 0) then this function
timer/animator/whatever is deleted. It is likely that you still hold a
pointer to its handle (Ecore_Timer, Ecore_Animator...) and thus you
must NULL-ify it, otherwise you'll later on delete a dead pointer and
crash.

If you don't have the reference and delete it at exit, then it is
another bug :-)

BR,

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to