From 5aa1a945708e234f493cacf9af7f31df70c88ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96nnerby?= Date: Thu, 13 Nov 2008 19:34:17 +0000 Subject: [PATCH] Fixed a bug in win32cpp::ApplicationThread where the calls stack where not protected by mutex. --- src/win32cpp/ApplicationThread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/win32cpp/ApplicationThread.cpp b/src/win32cpp/ApplicationThread.cpp index 9a105114a..46340a8e1 100644 --- a/src/win32cpp/ApplicationThread.cpp +++ b/src/win32cpp/ApplicationThread.cpp @@ -86,7 +86,10 @@ bool ApplicationThread::InMainThread() ////////////////////////////////////////// void ApplicationThread::AddCall(CallClassBase *callClass) { - this->calls.push_back(CallClassPtr(callClass)); + { + boost::mutex::scoped_lock lock(this->mutex); + this->calls.push_back(CallClassPtr(callClass)); + } this->NotifyMainThread(); }