From c4fd5c5e3751da9428ca18b32f8f3bfe2931e828 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 4 Jan 2009 18:19:46 +0000 Subject: [PATCH] Fix segv on CopyKeyClass --- mi/mieq.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 77804b4..dc1da85 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -362,14 +362,15 @@ mieqProcessInputEvents(void) NewCurrentScreen (dev, DequeueScreen(dev), x, y); } else { - /* Force a copy of the key class into the VCK so that the layout - is transferred. */ - if (event->u.u.type == DeviceKeyPress || - event->u.u.type == DeviceKeyRelease) - CopyKeyClass(dev, master); + if (master) { + /* Force a copy of the key class into the VCK so that the layout + is transferred. */ + if (event->u.u.type == DeviceKeyPress || + event->u.u.type == DeviceKeyRelease) + CopyKeyClass(dev, master); - if (master) CopyGetMasterEvent(master, event, masterEvents, nevents); + } /* If someone's registered a custom event handler, let them * steal it. */ -- 1.6.0.5