From d54451f334d6212a48cfb5aa8bd6409c115ad7f3 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 11 Jun 2012 00:37:08 +0000 Subject: [PATCH] SDK: - avoid duplicates in AssetDataObject asset list git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9469 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/core/assets/AssetDataObject.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java index e303bf54b..d8eb9048e 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java @@ -289,7 +289,7 @@ public class AssetDataObject extends MultiDataObject { return; } FileObject obj = pm.getAssetFolder().getFileObject(ak.getName()); - if (obj != null) { + if (obj != null && !assetList.contains(obj)) { assetList.add(obj); assetKeyList.add(ak); } @@ -303,8 +303,9 @@ public class AssetDataObject extends MultiDataObject { FileObject obj = pm.getAssetFolder().getFileObject(ak1.getName()); if (obj != null && assetList.contains(obj)) { assetList.remove(obj); - failedList.add(ak1); + assetKeyList.remove(ak1); } + failedList.add(ak1); } public void start() {