diff options
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Events.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Events.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index d8d4fad9c..377e936f7 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -619,14 +619,16 @@ InputHandlerProc xf86SetConsoleHandler(InputHandlerProc proc, pointer data) { static IHPtr handler = NULL; - IHPtr old_handler = handler; + InputHandlerProc old_proc = NULL; - if (old_handler) - xf86RemoveGeneralHandler(old_handler); + if (handler) { + old_proc = handler->ihproc; + xf86RemoveGeneralHandler(handler); + } handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data); - return (old_handler) ? old_handler->ihproc : NULL; + return old_proc; } static void |