Don't terminate DRM display if it's null

This commit is contained in:
Chris Thrasher 2023-02-04 17:34:15 -07:00
parent ef20b58895
commit 347b306d21

View File

@ -112,7 +112,8 @@ void cleanup()
drmModeFreeEncoder(drmNode.savedEncoder); drmModeFreeEncoder(drmNode.savedEncoder);
drmModeFreeCrtc(drmNode.originalCrtc); drmModeFreeCrtc(drmNode.originalCrtc);
eglTerminate(display); if (display != EGL_NO_DISPLAY)
eglTerminate(display);
display = EGL_NO_DISPLAY; display = EGL_NO_DISPLAY;
gbm_device_destroy(gbmDevice); gbm_device_destroy(gbmDevice);