mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
test: Fix popup test crash on exit
If the done signal is emitted by the common event handler, the window and all of its children have already been destroyed, so don't try to render with invalid renderer objects.
This commit is contained in:
parent
70c149c88f
commit
21ff699251
1 changed files with 4 additions and 0 deletions
|
|
@ -188,6 +188,10 @@ static void loop(void)
|
|||
SDLTest_CommonEvent(state, &event, &done);
|
||||
}
|
||||
|
||||
if (done) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Show the tooltip if the delay period has elapsed */
|
||||
if (SDL_GetTicks() > tooltip_timer) {
|
||||
if (tooltip.win == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue