fix(Core/OutdoorPvP): Fix use-after-free in DelCapturePoint (#25229)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc 2026-04-05 09:24:53 -05:00 committed by GitHub
parent 27e823fa21
commit 2265ee51ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,15 +215,15 @@ bool OPvPCapturePoint::DelObject(uint32 type)
bool OPvPCapturePoint::DelCapturePoint()
{
sObjectMgr->DeleteGOData(m_capturePointSpawnId);
m_capturePointSpawnId = 0;
if (_capturePoint)
{
_capturePoint->SetRespawnTime(0); // not save respawn time
_capturePoint->Delete();
}
sObjectMgr->DeleteGOData(m_capturePointSpawnId);
m_capturePointSpawnId = 0;
return true;
}