From 552bee47cb23267b90dee422de0b6fdf20fb8453 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 27 Oct 2023 10:11:00 -0700 Subject: [PATCH] Clear any previous errors if we successfully show a message box --- src/video/SDL_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index d68c887004766..eec3e0dd87978 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -4945,6 +4945,8 @@ int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) if (!*error) { SDL_SetError("No message system available"); } + } else { + SDL_ClearError(); } (void)SDL_AtomicDecRef(&SDL_messagebox_count);