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

This commit is contained in:
Shauren authored and Ovahlord committed 2022-01-12 15:56:48 +01:00
1 parent cf29d94161
commit 6252bd9fa8
1 file changed
+2 -1
+2 -1
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();
}