Core/Unit: Force cancel unit events before invalidating the object on destruction

* Closes #16675
This commit is contained in:
Naios authored and Aokromes committed 2016-08-29 22:08:02 +02:00
1 parent df2c6972c4
commit 2f22212d0d
1 file changed
+3 -1
+3 -1
View File
@@ -288,9 +288,11 @@ Unit::~Unit()
if (m_currentSpells[i])
{
m_currentSpells[i]->SetReferencedFromCurrent(false);
m_currentSpells[i] = NULL;
m_currentSpells[i] = nullptr;
}
m_Events.KillAllEvents(true);
_DeleteRemovedAuras();
delete i_motionMaster;