From de26218336505bb9902144649805974be97e3b64 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Apr 2010 11:46:53 +1000 Subject: [PATCH] xfree86: dga needs to the master keyboard state (#27573) GetPairedDevice() may not always return the keyboard, resulting in a null-pointer derefernce when accessing the XKB state. X.Org Bug 27573 Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86DGA.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 804fd37..faa1cd0 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1094,7 +1094,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse) ev.length = sizeof(ev); ev.type = event->subtype; ev.corestate = butc->state; - ev.corestate |= XkbStateFieldFromRec(&GetPairedDevice(mouse)->key->xkbInfo->state); + ev.corestate |= XkbStateFieldFromRec(&GetMaster(mouse, MASTER_KEYBOARD)->key->xkbInfo->state); UpdateDeviceState(mouse, &ev); -- 1.6.6.1