Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_attach.c 


Log Message:
Avoid some potential stale references to the tooltip timer.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_attach.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_attach.c        16 Nov 2005 23:36:28 -0000      1.18
+++ ewl_attach.c        17 Nov 2005 06:45:57 -0000      1.19
@@ -443,8 +443,10 @@
 
        /* make sure the timer gets cleaned up if the widget goes away */
        if ((ewl_attach_tooltip) && (w == ewl_attach_tooltip->to) 
-                       && (ewl_attach_tooltip->timer))
+                       && (ewl_attach_tooltip->timer)) {
                ecore_timer_del(ewl_attach_tooltip->timer);
+               ewl_attach_tooltip->timer = NULL;
+       }
 
        if (w->attach)
                ewl_attach_list_free(w->attach);
@@ -625,8 +627,14 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("data", data, FALSE);
 
+       /* we are returning false so that will shutdown the timer, just need
+        * to make sure we don't try to del it a second time so set it NULL */
+       ewl_attach_tooltip->timer = NULL;
+
        w = data;
        emb = ewl_embed_widget_find(w);
+       if (!emb)
+               DRETURN_INT(FALSE, DLEVEL_STABLE);
 
        if (!(ewl_attach_tooltip->win))
        {
@@ -692,10 +700,6 @@
        ewl_widget_show(ewl_attach_tooltip->win);
        ewl_widget_show(ewl_attach_tooltip->box);
 
-       /* we are returning false so that will shutdown the timer, just need
-        * to make sure we don't try to del it a second time so set it NULL */
-       ewl_attach_tooltip->timer = NULL;
-
        DRETURN_INT(FALSE, DLEVEL_STABLE);
 }
 




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to