diff --git a/src/main/java/eu/decentsoftware/holograms/api/utils/color/caching/LruCache.java b/src/main/java/eu/decentsoftware/holograms/api/utils/color/caching/LruCache.java index a02d8782..26d12f6a 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/utils/color/caching/LruCache.java +++ b/src/main/java/eu/decentsoftware/holograms/api/utils/color/caching/LruCache.java @@ -43,7 +43,8 @@ public void put(String input, String result) { if (MAP.containsKey(input)) { QUE.remove(input); } else { - if (QUE.size() == maxSize) { + int size = QUE.size(); + if (size == maxSize && size > 0) { String temp = QUE.removeLast(); MAP.remove(temp); }