From 5f5117729de3a8a4eb6e17dc0979e4b1c1ef9918 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 12 Aug 2005 01:17:58 +0000 Subject: [PATCH] Fix segfault when "kbd" fails to load and "keyboard" driver is not configured. --- hw/xfree86/common/xf86Init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 24d904af0..ad1748a13 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1137,7 +1137,8 @@ InitInput(argc, argv) else { #ifdef USE_DEPRECATED_KEYBOARD_DRIVER /* Only set this if we're allowing the old driver. */ - xf86Info.pKeyboard = AddInputDevice(xf86Info.kbdProc, TRUE); + if (xf86Info.kbdProc != NULL) + xf86Info.pKeyboard = AddInputDevice(xf86Info.kbdProc, TRUE); #endif } if (corePointer)