There are several places this function is called with a NULL event pointer
including lib/Xm/Primitive.c (_PrimitiveTrait_Redraw) line 1558.  The
attached trivial patch prevents a core dump in these cases.  Based upon
the comment above this change, I doubt this line of code should even be
there.

Please CC me on responses as I am not subscribed to the list.  Thank you.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444
diff -urN -x .build -x .inst -x .sinst lesstif-0.93.40-orig/lib/Xm/TextF.c 
lesstif-0.93.40/lib/Xm/TextF.c
--- lesstif-0.93.40-orig/lib/Xm/TextF.c 2003-02-07 01:29:00.000000000 -0600
+++ lesstif-0.93.40/lib/Xm/TextF.c      2003-02-25 15:02:36.000000000 -0600
@@ -1455,7 +1455,7 @@
        Xbae examples/matrix puts TextF into an infinite loop of exposes
        without this!!!!!
      */
-    if (event->xexpose.count != 0) return;
+    if (event && event->xexpose.count != 0) return;
 
     /* Then draw ourselves on top of it */
     CursorErase(w);

Reply via email to