From 31e8a4627a2d798bbe8724dd29e45a8b5daa0fa4 Mon Sep 17 00:00:00 2001 From: Vladislav Dmitrievich Turbanov Date: Wed, 10 Feb 2021 20:54:15 +0300 Subject: [PATCH] * Fixed closing the test window. --- test/testwm2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/testwm2.c b/test/testwm2.c index 1273872dc..d84928358 100644 --- a/test/testwm2.c +++ b/test/testwm2.c @@ -104,8 +104,10 @@ loop() for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; - SDL_RenderClear(renderer); - SDL_RenderPresent(renderer); + if (renderer != NULL) { + SDL_RenderClear(renderer); + SDL_RenderPresent(renderer); + } } #ifdef __EMSCRIPTEN__ if (done) {