mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 00:06:11 +00:00
fix(Core/Common): Container fixes use after free (#21460)
This commit is contained in:
@@ -205,10 +205,12 @@ public:
|
||||
{
|
||||
if (_availableRiftPositions.size() > 1)
|
||||
{
|
||||
spawnPos = Acore::Containers::SelectRandomContainerElementIf(_availableRiftPositions, [&](Position pos) -> bool
|
||||
auto spawnPosItr = Acore::Containers::SelectRandomContainerElementIf(_availableRiftPositions, [&](Position const& pos) -> bool
|
||||
{
|
||||
return pos != lastPosition;
|
||||
});
|
||||
if (spawnPosItr != _availableRiftPositions.end())
|
||||
spawnPos = *spawnPosItr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user