mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:53:52 +00:00
bugfix
This commit is contained in:
parent
1ac3d99c78
commit
94069e3a7e
1 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,7 @@ void MWMechanics::AiSequence::copy (const AiSequence& sequence)
|
|||
iter!=sequence.mPackages.end(); ++iter)
|
||||
mPackages.push_back ((*iter)->clone());
|
||||
mCombat = sequence.mCombat;
|
||||
mCombatPackage = sequence.mCombatPackage;
|
||||
mCombatPackage = sequence.mCombatPackage->clone();
|
||||
}
|
||||
|
||||
MWMechanics::AiSequence::AiSequence() : mDone (false), mCombat (false), mCombatPackage (0) {}
|
||||
|
@ -93,7 +93,11 @@ void MWMechanics::AiSequence::clear()
|
|||
for (std::list<AiPackage *>::const_iterator iter (mPackages.begin()); iter!=mPackages.end(); ++iter)
|
||||
delete *iter;
|
||||
|
||||
if(mCombatPackage) delete mCombatPackage;
|
||||
if(mCombatPackage)
|
||||
{
|
||||
delete mCombatPackage;
|
||||
mCombatPackage = 0;
|
||||
}
|
||||
mPackages.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue