Skip to content

Commit

Permalink
Clear any previous errors if we successfully show a message box
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 27, 2023
1 parent 343da85 commit 552bee4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/SDL_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 552bee4

Please sign in to comment.