Browse Source

testautomation: fix renderer leak in video tests

Anonymous Maarten 1 year ago
parent
commit
2f13f66c71
1 changed files with 2 additions and 0 deletions
  1. 2 0
      test/testautomation_video.c

+ 2 - 0
test/testautomation_video.c

@@ -55,6 +55,7 @@ static SDL_Window *createVideoSuiteTestWindow(const char *title)
              * so delay to give the window time to actually appear on the desktop.
              */
             SDL_Delay(100);
+            SDL_DestroyRenderer(renderer);
         } else {
             SDLTest_Log("Unable to create a renderer, some tests may fail on Wayland/XWayland");
         }
@@ -1786,6 +1787,7 @@ static int video_setWindowCenteredOnDisplay(void *arg)
                          * so delay to give the window time to actually appear on the desktop.
                          */
                         SDL_Delay(100);
+                        SDL_DestroyRenderer(renderer);
                     } else {
                         SDLTest_Log("Unable to create a renderer, tests may fail under Wayland");
                     }