Commit fb8444e7 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer

Don't use AMDGPUEntPriv in AMDGPUFreeRec

It crashes if info == NULL.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8e7ee03f
......@@ -107,7 +107,8 @@ static Bool AMDGPUGetRec(ScrnInfoPtr pScrn)
/* Free our private AMDGPUInfoRec */
static void AMDGPUFreeRec(ScrnInfoPtr pScrn)
{
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
DevUnion *pPriv;
AMDGPUEntPtr pAMDGPUEnt;
AMDGPUInfoPtr info;
if (!pScrn)
......@@ -117,6 +118,9 @@ static void AMDGPUFreeRec(ScrnInfoPtr pScrn)
if (info && info->fbcon_pixmap)
pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap);
pPriv = xf86GetEntityPrivate(xf86GetEntityInfo(pScrn->entityList[pScrn->numEntities - 1])->index,
gAMDGPUEntityIndex);
pAMDGPUEnt = pPriv->ptr;
if (pAMDGPUEnt->fd > 0) {
DevUnion *pPriv;
AMDGPUEntPtr pAMDGPUEnt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment