diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/mga_dri.c | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -2,6 +2,7 @@ * src/mga_dri.c: Coverity #92: Eliminate a dead code path. + Coverity #1009: Check for NULL first before assigning to pMGADRI. 2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org> diff --git a/src/mga_dri.c b/src/mga_dri.c index 46e5f98..8780160 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -1252,12 +1252,14 @@ Bool MGADRIFinishScreenInit( ScreenPtr pScreen ) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; MGAPtr pMga = MGAPTR(pScrn); MGADRIServerPrivatePtr pMGADRIServer = pMga->DRIServerInfo; - MGADRIPtr pMGADRI = (MGADRIPtr)pMga->pDRIInfo->devPrivate; + MGADRIPtr pMGADRI; int i; if ( !pMga->pDRIInfo ) return FALSE; + pMGADRI = (MGADRIPtr)pMga->pDRIInfo->devPrivate; + pMga->pDRIInfo->driverSwapMethod = DRI_HIDE_X_CONTEXT; /* NOTE: DRIFinishScreenInit must be called before *DRIKernelInit |