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 /src/mga_dri.c | |
parent | 20eb3f159fe3629d1bfb6b9437912f55b690e068 (diff) |
Coverity #1009: Check for NULL first before assigning to pMGADRI.
Diffstat (limited to 'src/mga_dri.c')
-rw-r--r-- | src/mga_dri.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 |