Fix class not unlocked when program is stopped

#626
master
melex750 2016-06-24 17:29:32 -04:00
parent 64157090e6
commit d0d0c4f197
1 changed files with 2 additions and 0 deletions

View File

@ -214,6 +214,7 @@ bool CBotProgram::Run(void* pUser, int timer)
m_error = m_stack->GetError(m_errorStart, m_errorEnd);
m_stack->Delete();
m_stack = nullptr;
CBotClass::FreeLock(this);
return true; // execution is finished!
}
@ -226,6 +227,7 @@ void CBotProgram::Stop()
m_stack->Delete();
m_stack = nullptr;
m_entryPoint = nullptr;
CBotClass::FreeLock(this);
}
////////////////////////////////////////////////////////////////////////////////