diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java index 134493b964..71b1e839ec 100644 --- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java +++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/settlerimages/SettlerImageMap.java @@ -111,7 +111,8 @@ private void addByLine(String line, HashMap priorit SettlerImageFlavor flavor = new SettlerImageFlavor(type, action, material, direction); int priority = flavor.calculatePriority(); - if(!priorities.containsKey(flavor) || priorities.get(flavor) < priority) { + Integer cachedPriority = priorities.get(flavor); + if(cachedPriority != null || cachedPriority < priority) { map.put(flavor, new SettlerImageMapItem(fileIndex, sequence, start, duration)); priorities.put(flavor, priority); }