Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        pager.c 


Log Message:
Fix segv on pager close.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -3 -r1.160 -r1.161
--- pager.c     16 Jul 2005 16:57:43 -0000      1.160
+++ pager.c     18 Jul 2005 21:52:38 -0000      1.161
@@ -71,6 +71,7 @@
 #define PAGER_EVENT_MOTION     0
 #define PAGER_EVENT_MOUSE_IN   1
 
+static void         PagerScanCancel(Pager * p);
 static void         PagerScanTimeout(int val, void *data);
 static void         PagerUpdateTimeout(int val, void *data);
 static void         PagerCheckUpdate(Pager * p);
@@ -107,11 +108,8 @@
 static void
 PagerDestroy(Pager * p)
 {
-   char                s[4096];
-
    RemoveItem("PAGER", p->win, LIST_FINDBY_ID, LIST_TYPE_PAGER);
-   Esnprintf(s, sizeof(s), "__.%x", (unsigned)p->win);
-   RemoveTimerEvent(s);
+   PagerScanCancel(p);
    if (p->name)
       Efree(p->name);
    EDestroyWindow(p->win);
@@ -168,6 +166,18 @@
 }
 
 static void
+PagerScanCancel(Pager * p)
+{
+   char                s[128];
+
+   if (!p->scan_pending)
+      return;
+
+   Esnprintf(s, sizeof(s), "pg-scan.%x", (unsigned)p->win);
+   RemoveTimerEvent(s);
+}
+
+static void
 PagerScanTimeout(int val __UNUSED__, void *data)
 {
    Pager              *p;




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to