Core/Groups: Fixed crash in loot rolls happening when looted object despawns before roll expires

This commit is contained in:
Shauren
2022-01-12 15:56:48 +01:00
committed by Ovahlord
parent cf29d94161
commit 6252bd9fa8

View File

@@ -2792,8 +2792,9 @@ Group::Rolls::iterator Group::GetRoll(ObjectGuid Guid)
{
Rolls::iterator iter;
for (iter=RollId.begin(); iter != RollId.end(); ++iter)
if ((*iter)->itemGUID == Guid && (*iter)->isValid())
if ((*iter)->isValid() && (*iter)->itemGUID == Guid)
return iter;
return RollId.end();
}