fix(Core): Crashfix on vehicle uninstall. (#13036)

This commit is contained in:
UltraNix
2022-09-20 02:08:19 +02:00
committed by GitHub
parent a82c11e751
commit 2ded17464a

View File

@@ -109,8 +109,10 @@ void Vehicle::Uninstall()
LOG_DEBUG("vehicles", "Vehicle::Uninstall {}", _me->GetGUID().ToString());
RemoveAllPassengers();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
if (_me && _me->GetTypeId() == TYPEID_UNIT)
{
sScriptMgr->OnUninstall(this);
}
}
void Vehicle::Reset(bool evading /*= false*/)