diff options
author | smatz <smatz@openttd.org> | 2009-11-02 13:36:17 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-11-02 13:36:17 +0000 |
commit | da54a01114c45e888af13f80b49510858f5abc17 (patch) | |
tree | 721c142c07e7a5bd2df81f7a7864c1674c0288ef /src/video | |
parent | dc4b251dbd8aa17f2af6f0dfb84515bb461f8b32 (diff) | |
download | openttd-da54a01114c45e888af13f80b49510858f5abc17.tar.xz |
(svn r17950) -Fix (r17776): _draw_mutex was never destroyed, _draw_thread was never joined
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/sdl_v.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index a0fb3c6d6..477314e0d 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -523,7 +523,7 @@ void VideoDriver_SDL::MainLoop() InteractiveRandom(); // randomness while (PollEvent() == -1) {} - if (_exit_game) return; + if (_exit_game) break; mod = SDL_CALL SDL_GetModState(); keys = SDL_CALL SDL_GetKeyState(&numkeys); @@ -592,6 +592,8 @@ void VideoDriver_SDL::MainLoop() if (_draw_threaded) { _draw_continue = false; + /* Sending signal if there is no thread blocked + * is very valid and results in noop */ _draw_mutex->SendSignal(); _draw_mutex->EndCritical(); _draw_thread->Join(); |