diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 9e52e61..e40534f 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -1384,7 +1384,8 @@ DRIDoWakeupHandler(int screenNum, pointe DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRILock(pScreen, 0); - if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { + if (pDRIPriv && + pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { /* hide X context by swapping 2D component here */ (*pDRIPriv->pDriverInfo->SwapContext)(pScreen, DRI_3D_SYNC, @@ -1402,7 +1403,8 @@ DRIDoBlockHandler(int screenNum, pointer ScreenPtr pScreen = screenInfo.screens[screenNum]; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { + if (pDRIPriv && + pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { /* hide X context by swapping 2D component here */ (*pDRIPriv->pDriverInfo->SwapContext)(pScreen, DRI_2D_SYNC, diff --git a/hw/xfree86/os-support/xf86drm.h b/hw/xfree86/os-support/xf86drm.h