From c0695b0a3a7177e05a90a1a0619b604aab1db250 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Tue, 8 Nov 2011 23:33:11 +0000 Subject: [PATCH] - make ClassLoader list in AssetManager a syncronized list git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8605 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/desktop/com/jme3/asset/DesktopAssetManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/desktop/com/jme3/asset/DesktopAssetManager.java b/engine/src/desktop/com/jme3/asset/DesktopAssetManager.java index 1a8393916..8a4003388 100644 --- a/engine/src/desktop/com/jme3/asset/DesktopAssetManager.java +++ b/engine/src/desktop/com/jme3/asset/DesktopAssetManager.java @@ -46,6 +46,7 @@ import java.io.InputStream; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -100,7 +101,7 @@ public class DesktopAssetManager implements AssetManager { public void addClassLoader(ClassLoader loader){ if(classLoaders == null) - classLoaders = new ArrayList(); + classLoaders = Collections.synchronizedList(new ArrayList()); classLoaders.add(loader); }