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