fix(Core/OutdoorPvP): Fix use-after-free in DelCapturePoint (#25229)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user