Commit 31e8a4627a2d798bbe8724dd29e45a8b5daa0fa4

Vladislav Dmitrievich Turbanov 2021-02-10T20:54:15

* Fixed closing the test window.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/test/testwm2.c b/test/testwm2.c
index 1273872..d849283 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) {