[KMSDRM] Improve the way to test if last window is being destroyed.

This commit is contained in:
Vanfanel authored and Sam Lantinga committed 2021-03-18 11:04:28 -07:00
1 parent 8638674a87
commit 4acd1dcad4
1 file changed
+1 -1
+1 -1
View File
@@ -1088,7 +1088,7 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
KMSDRM_DestroySurfaces(_this, window);
/* Unload library and deinit GBM, but only if this is the last remaining window.*/
if (viddata->num_windows < 2) {
if ((viddata->num_windows - 1) == 0) {
/* Unload EGL/GL library and free egl_data. */
if (_this->egl_data) {