From f4cb25c2ed832bf4cfcd4d25198fe5a895430fed Mon Sep 17 00:00:00 2001 From: Ville Syrjala Date: Mon, 24 Jan 2011 01:06:42 +0200 Subject: [PATCH] xfree86/dga: Remove the ET_DGAEvent handler only if it was installed Remove the handler only if it was installed. Also mark it as uninstalled, otherwise it wouldn't get reinstalled after a server reset. Signed-off-by: Ville Syrjala Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer --- hw/xfree86/common/xf86DGA.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 3cded85bf..c4b2d7d9a 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -250,9 +250,10 @@ DGACloseScreen(int i, ScreenPtr pScreen) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - if (XDGAEventBase) { + if (mieq_installed) { mieqSetHandler(ET_DGAEvent, NULL); - } + mieq_installed = 0; + } FreeMarkedVisuals(pScreen);