diff -Nurp xserver-xorg-input-evdev-2.2.2/src/emuMB.c xserver-xorg-input-evdev-2.2.2-working/src/emuMB.c
--- xserver-xorg-input-evdev-2.2.2/src/emuMB.c	2009-03-22 23:35:13.000000000 -0700
+++ xserver-xorg-input-evdev-2.2.2-working/src/emuMB.c	2009-07-30 14:30:19.000000000 -0700
@@ -280,7 +280,7 @@ void EvdevMBEmuWakeupHandler(pointer dat
     EvdevPtr     pEvdev = (EvdevPtr)pInfo->private;
     int ms;
 
-    if (pEvdev->emulateMB.pending)
+    if (pEvdev && pEvdev->emulateMB.pending)
     {
         ms = pEvdev->emulateMB.expires - GetTimeInMillis();
         if (ms <= 0)
@@ -296,7 +296,7 @@ void EvdevMBEmuBlockHandler(pointer data
     EvdevPtr        pEvdev= (EvdevPtr) pInfo->private;
     int             ms;
 
-    if (pEvdev->emulateMB.pending)
+    if (pEvdev && pEvdev->emulateMB.pending)
     {
         ms = pEvdev->emulateMB.expires - GetTimeInMillis ();
         if (ms <= 0)
@@ -346,7 +346,7 @@ void
 EvdevMBEmuEnable(InputInfoPtr pInfo, BOOL enable)
 {
     EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
-    if (pEvdev->emulateMB.enabled == MBEMU_AUTO)
+    if (pEvdev && pEvdev->emulateMB.enabled == MBEMU_AUTO)
         pEvdev->emulateMB.enabled = enable;
 }
 
