Fix null-pointer issue when trying to get first element of empty list.

This commit is contained in:
BONNe 2019-02-20 00:33:53 +02:00
parent 4c762dd269
commit 5e2d3f9cc1
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}