- attempt to fix double free bug

This commit is contained in:
Mark Vejvoda 2013-03-08 21:00:37 +00:00
parent e74f747fbd
commit 11d4c4a1dc

View File

@ -1039,11 +1039,12 @@ bool ClientInterface::getNetworkCommand(int frameCount, int currentCachedPending
bool waitForData = false;
if(quit == false && this->quitThread == false) {
MutexSafeWrapper safeMutex(networkCommandListThreadAccessor,CODE_AT_LINE);
safeMutex.ReleaseLock(true);
//MutexSafeWrapper safeMutex(networkCommandListThreadAccessor,CODE_AT_LINE);
//safeMutex.ReleaseLock(true);
for(;quit == false && this->quitThread == false;) {
safeMutex.Lock();
MutexSafeWrapper safeMutex(networkCommandListThreadAccessor,CODE_AT_LINE);
//safeMutex.Lock();
uint64 copyCachedLastPendingFrameCount = cachedLastPendingFrameCount;
if(cachedPendingCommands.find(frameCount) != cachedPendingCommands.end()) {
Commands &frameCmdList = cachedPendingCommands[frameCount];