Core/Unit: Force cancel unit events before invalidating the object on destruction
* Closes #16675
This commit is contained in:
1 parent
df2c6972c4
commit
2f22212d0d
1 file changed
+3
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user