mirror of https://github.com/libsdl-org/SDL
SDL_test: fix SDLTest_CommonQuit with NULL state
This commit is contained in:
parent
0160e9eac6
commit
6a305e1532
|
@ -2543,6 +2543,7 @@ void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done
|
|||
|
||||
void SDLTest_CommonQuit(SDLTest_CommonState *state)
|
||||
{
|
||||
if (state) {
|
||||
int i;
|
||||
|
||||
if (state->targets) {
|
||||
|
@ -2567,6 +2568,7 @@ void SDLTest_CommonQuit(SDLTest_CommonState *state)
|
|||
}
|
||||
SDL_free(state->windows);
|
||||
}
|
||||
}
|
||||
SDL_Quit();
|
||||
SDLTest_CommonDestroyState(state);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue