mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Merge pull request #91 from Fayth/fix-advmap-restoring
Short and clear code is always welcome.
This commit is contained in:
@ -141,10 +141,10 @@ void CPlayerInterface::init(shared_ptr<CCallback> CB)
|
||||
if(!towns.size() && !wanderingHeroes.size())
|
||||
initializeHeroTownList();
|
||||
|
||||
if(!adventureInt)
|
||||
adventureInt = new CAdvMapInt();
|
||||
else
|
||||
adventureInt->restoreState();
|
||||
// always recreate advmap interface to avoid possible memory-corruption bugs
|
||||
if(adventureInt)
|
||||
delete adventureInt;
|
||||
adventureInt = new CAdvMapInt();
|
||||
}
|
||||
void CPlayerInterface::yourTurn()
|
||||
{
|
||||
|
Reference in New Issue
Block a user