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(); }