From: Michel Dänzer <michel.daen...@amd.com>

This can happen if PreInit fails early.

Signed-off-by: Michel Dänzer <michel.daen...@amd.com>
---
 src/amdgpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 7dc9e22a9..43c18d426 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -137,7 +137,7 @@ static void AMDGPUFreeRec(ScrnInfoPtr pScrn)
 
        pPriv = xf86GetEntityPrivate(pEnt->index, gAMDGPUEntityIndex);
        pAMDGPUEnt = pPriv->ptr;
-       if (pAMDGPUEnt->fd > 0) {
+       if (pAMDGPUEnt && pAMDGPUEnt->fd > 0) {
                DevUnion *pPriv;
                AMDGPUEntPtr pAMDGPUEnt;
                pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
-- 
2.16.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to