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()
|
bool OPvPCapturePoint::DelCapturePoint()
|
||||||
{
|
{
|
||||||
sObjectMgr->DeleteGOData(m_capturePointSpawnId);
|
|
||||||
m_capturePointSpawnId = 0;
|
|
||||||
|
|
||||||
if (_capturePoint)
|
if (_capturePoint)
|
||||||
{
|
{
|
||||||
_capturePoint->SetRespawnTime(0); // not save respawn time
|
_capturePoint->SetRespawnTime(0); // not save respawn time
|
||||||
_capturePoint->Delete();
|
_capturePoint->Delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sObjectMgr->DeleteGOData(m_capturePointSpawnId);
|
||||||
|
m_capturePointSpawnId = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user