diff -Naur xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_acpi.c xorg-server-1.1.1-closing-lid-doesnt-crash-X/hw/xfree86/os-support/linux/lnx_acpi.c --- xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_acpi.c 2006-07-05 20:31:41.000000000 +0200 +++ xorg-server-1.1.1-closing-lid-doesnt-crash-X/hw/xfree86/os-support/linux/lnx_acpi.c 2006-10-26 14:22:58.000000000 +0200 @@ -73,13 +73,15 @@ #endif notify = strtok(NULL, " "); - notify_l = strtoul(notify, NULL, 16); + if (notify) notify_l = strtoul(notify, NULL, 16); + else notify_l = 0; #if 0 ErrorF("notify: 0x%lx\n",notify_l); #endif data = strtok(NULL, " "); - data_l = strtoul(data, NULL, 16); + if (data) data_l = strtoul(data, NULL, 16); + else data_l = 0; #if 0 ErrorF("data: 0x%lx\n",data_l); #endif