From 79d27e4b7b4a86d8ca33456871de05f86d4d14c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 May 2017 17:07:20 +0300 Subject: Add temination flag for background download threads. This probably will fix random crash in tests after start and exit. --- src/client.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 307418964..21ea23ce1 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -208,6 +208,7 @@ time_t start_time; unsigned int mLastHost = 0; unsigned long mSearchHash = 0; int textures_count = 0; +volatile bool isTerminate = false; namespace { @@ -619,6 +620,7 @@ void Client::gameClear() { if (logger) logger->log1("Quitting1"); + isTerminate = true; config.removeListeners(this); delete2(assertListener); -- cgit v1.2.3-60-g2f50