- fix double cache deletion for AssetDataObjects

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10326 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 180f51886c
commit 90e91f3d0b
  1. 4
      sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java

@ -253,12 +253,10 @@ public class AssetDataObject extends MultiDataObject {
public synchronized void closeAsset() {
ProjectAssetManager mgr = getLookup().lookup(ProjectAssetManager.class);
if (mgr != null && savable != null) {
logger.log(Level.INFO, "Closing asset {0}, deleting from cache.", getName());
mgr.deleteFromCache(getAssetKey());
//delete referenced assets too
for (Iterator<AssetKey> it = assetKeyList.iterator(); it.hasNext();) {
AssetKey assetKey1 = it.next();
logger.log(Level.INFO, "Removing linked asset {0}, from cache via main asset {1}.", new Object[]{assetKey1.getName(), getName()});
logger.log(Level.INFO, "Removing asset {0}, from cache via main asset {1}.", new Object[]{assetKey1.getName(), getName()});
mgr.deleteFromCache(assetKey1);
}
savable = null;

Loading…
Cancel
Save