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

Co-authored-by: blinkysc <[email protected]>
This commit is contained in:
blinkysc
2026-04-05 16:24:53 +02:00
committed by GitHub
co-authored by blinkysc
parent 27e823fa21
commit 2265ee51ab
+3 -3
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;
}