mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-28 13:36:06 +01:00
Fix null-pointer issue when trying to get first element of empty list.
This commit is contained in:
parent
4c762dd269
commit
5e2d3f9cc1
@ -435,7 +435,7 @@ public class ChallengesManager
|
||||
|
||||
Iterator<LogEntry> entryIterator = cachedData.getHistory().iterator();
|
||||
|
||||
while (this.shouldBeRemoved(entryIterator.next(), survivalTime))
|
||||
while (entryIterator.hasNext() && this.shouldBeRemoved(entryIterator.next(), survivalTime))
|
||||
{
|
||||
entryIterator.remove();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user