diff --git a/src/fr/devinsy/statoolinfos/uptime/UptimeJournal.java b/src/fr/devinsy/statoolinfos/uptime/UptimeJournal.java index 865add7..96d4226 100644 --- a/src/fr/devinsy/statoolinfos/uptime/UptimeJournal.java +++ b/src/fr/devinsy/statoolinfos/uptime/UptimeJournal.java @@ -325,10 +325,14 @@ public class UptimeJournal Service current = iterator.next(); if (current.getWebsiteURL() != null) { - if (getUptimes(current.getWebsiteURL()).last().getStatus() == UptimeStatus.ERROR) + Uptimes currentUptimes = getUptimes(current.getWebsiteURL()); + if (!currentUptimes.isEmpty()) { - ended = true; - result = true; + if (currentUptimes.last().getStatus() == UptimeStatus.ERROR) + { + ended = true; + result = true; + } } } }