From 1f7e794b82c65eef7f863e7bcc9802e82ce1bc30 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 25 Feb 2021 19:13:57 +0100 Subject: [PATCH] DrmGpu: add gbm device nullptr check BUG: 433145 --- src/plugins/platforms/drm/drm_gpu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index 48b17f4881..4563db74d4 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -74,7 +74,9 @@ DrmGpu::~DrmGpu() eglTerminate(m_eglDisplay); } #if HAVE_GBM - gbm_device_destroy(m_gbmDevice); + if (m_gbmDevice) { + gbm_device_destroy(m_gbmDevice); + } #endif qDeleteAll(m_crtcs); qDeleteAll(m_connectors);