*Event could become NULL add check

re,
 wh

Signed-off-by: [email protected]


--- libXt-1.0.8/src/TMparse.c.org       2010-10-20 22:04:30.000000000 +0200
+++ libXt-1.0.8/src/TMparse.c   2010-10-20 22:04:44.000000000 +0200
@@ -1291,10 +1291,15 @@
        *event = timerEventRec;

     }
-
+    /*
+      if reps==0 -> lastDownEvent == NULL
+    */
     event->next = lastDownEvent;
     *eventP = event;
-    *actionsP = &lastDownEvent->actions;
+    if (lastDownEvent)
+      *actionsP = &lastDownEvent->actions;
+    else
+      *actionsP = NULL ;
 }

 static void RepeatUp(
@@ -1398,10 +1403,15 @@
        *event = *downEvent;

        }
-
+    /*
+      if reps==0 -> lastUpEvent == NULL
+    */
     event->next = lastUpEvent;
     *eventP = event;
-    *actionsP = &lastUpEvent->actions;
+    if (lastUpEvent)
+      *actionsP = &lastUpEvent->actions;
+    else
+      *actionsP = NULL ;
 }

 static void RepeatOther(
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to