diff --git a/jme3-core/src/main/java/com/jme3/asset/ImplHandler.java b/jme3-core/src/main/java/com/jme3/asset/ImplHandler.java index a68e46927..571be53c3 100644 --- a/jme3-core/src/main/java/com/jme3/asset/ImplHandler.java +++ b/jme3-core/src/main/java/com/jme3/asset/ImplHandler.java @@ -204,8 +204,10 @@ public class ImplHandler { public void clearCache(){ // The iterator of the values collection is thread safe - for (AssetCache cache : classToCacheMap.values()){ - cache.clearCache(); + synchronized (classToCacheMap) { + for (AssetCache cache : classToCacheMap.values()){ + cache.clearCache(); + } } }