From a492c02649de4c60ac21a7fcb6b7c730b558dca6 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Fri, 28 Oct 2011 09:49:00 -0500 Subject: [PATCH] hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY --- hw/xwin/winnativegdi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/xwin/winnativegdi.c b/hw/xwin/winnativegdi.c index 4d7afe898..68f802005 100644 --- a/hw/xwin/winnativegdi.c +++ b/hw/xwin/winnativegdi.c @@ -315,7 +315,6 @@ static Bool winActivateAppNativeGDI (ScreenPtr pScreen) { winScreenPriv(pScreen); - winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* * Are we active? @@ -323,7 +322,8 @@ winActivateAppNativeGDI (ScreenPtr pScreen) */ if (pScreenPriv != NULL && pScreenPriv->fActive - && pScreenInfo->fFullScreen) + && pScreenPriv->pScreenInfo + && pScreenPriv->pScreenInfo->fFullScreen) { /* * Activating, attempt to bring our window @@ -338,7 +338,8 @@ winActivateAppNativeGDI (ScreenPtr pScreen) */ if (pScreenPriv != NULL && !pScreenPriv->fActive - && pScreenInfo->fFullScreen) + && pScreenPriv->pScreenInfo + && pScreenPriv->pScreenInfo->fFullScreen) { /* * Deactivating, stuff our window onto the