From fec0a38e6a12c8674e54a29b0c3ae54fa78e86ff Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 7 Sep 2017 06:44:38 +0300 Subject: Fix possible thread structure memory leak on SDL2 if thread terminated before cleanup. --- src/utils/sdl2helper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils/sdl2helper.cpp') diff --git a/src/utils/sdl2helper.cpp b/src/utils/sdl2helper.cpp index 4f99dc512..7648ccc2b 100644 --- a/src/utils/sdl2helper.cpp +++ b/src/utils/sdl2helper.cpp @@ -188,4 +188,10 @@ void SDL::initLogger() SDL2Logger::init(); } +void SDL::WaitThread(SDL_Thread *const thread) +{ + if (thread != nullptr) + SDL_WaitThread(thread, nullptr); +} + #endif // USE_SDL2 -- cgit v1.2.3-60-g2f50