From 5068bf06eb6f5c71d470a22a3d0cf5048aedf7f6 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 9 Aug 2015 21:34:31 +0200 Subject: [PATCH] Small synchronization fix. --- src/Terminal_Win32.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Terminal_Win32.cpp b/src/Terminal_Win32.cpp index 9f6b604..8731dcb 100644 --- a/src/Terminal_Win32.cpp +++ b/src/Terminal_Win32.cpp @@ -163,6 +163,8 @@ static inline std::filebuf *terminal_connect(FILE *const fs, std::ostream &os) static void terminal_shutdown(void) { + MUtils::Internal::CSLocker lock(g_terminal_lock); + if (g_terminal_attached) { g_fileBuf_stdout.reset();