1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00
Fixed problems with accessing shared memory sometimes occurring after application has previously crashed.
This commit is contained in:
Michał W. Urbańczyk
2009-12-19 12:31:57 +00:00
parent cc79f1e2bd
commit d037bec1be
4 changed files with 6 additions and 4 deletions

View File

@ -2011,6 +2011,7 @@ bool CGameState::getPath(int3 src, int3 dest, const CGHeroInstance * hero, CPath
void CGameState::calculatePaths(const CGHeroInstance *hero, CPathsInfo &out, int3 src, int movement)
{
assert(hero);
boost::shared_lock<boost::shared_mutex> lock(*mx);
if(src.x < 0)
src = hero->getPosition(false);
if(movement < 0)