From 5682b066e9739c92f2e4a2bef4337fe17cc0aa15 Mon Sep 17 00:00:00 2001 From: Manuel Alfayate Corchete Date: Thu, 22 Oct 2020 19:51:57 +0200 Subject: [PATCH] kmsdrm: Add comment about KMSDRM_VideoQuit() changes. --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 7b0fb644be17d..86e8dba160ea6 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -1448,6 +1448,10 @@ KMSDRM_VideoQuit(_THIS) return; } + /* Don't call any SDL_GetDisplay* function until we get sure that + VideoInit() succeeded, because the SDL_GetDisplay* call would + throw it's own SDL_SetError(), overwritting the error set in + the failed VideoInit() call. */ dispdata = (SDL_DisplayData *)SDL_GetDisplayDriverData(0); /*****************************************************************/