drm: destroy the gbm device after we are done with all of the objects

Just in case they still need to interact with gbm
This commit is contained in:
Aleix Pol 2021-04-20 00:15:44 +02:00
parent 300f28a5a9
commit d999aa6c6a

View file

@ -84,16 +84,16 @@ DrmGpu::~DrmGpu()
if (m_eglDisplay != EGL_NO_DISPLAY) {
eglTerminate(m_eglDisplay);
}
#if HAVE_GBM
if (m_gbmDevice) {
gbm_device_destroy(m_gbmDevice);
}
#endif
qDeleteAll(m_outputs);
qDeleteAll(m_crtcs);
qDeleteAll(m_connectors);
qDeleteAll(m_planes);
delete m_socketNotifier;
#if HAVE_GBM
if (m_gbmDevice) {
gbm_device_destroy(m_gbmDevice);
}
#endif
m_backend->session()->closeRestricted(m_fd);
}