diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-03-15 20:21:23 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-03-15 20:21:23 +0000 |
commit | 089c7be83d6cace94a692ec46a4c3a05b32fd4f4 (patch) | |
tree | 95d3290ba12fb19318162d2c75842b0f03eb30b9 | |
parent | 20eb3f159fe3629d1bfb6b9437912f55b690e068 (diff) |
Coverity #1009: Check for NULL first before assigning to pMGADRI.
-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 |