If the exported file can no longer be found, fall back to other means of loading the decal.

This commit is contained in:
Kevin Ruland 2012-07-25 20:33:55 +00:00 committed by U-WINDOWS-C28163E\Administrator
parent 03bc001bbd
commit 207a768ded

View File

@ -15,7 +15,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import net.sf.openrocket.file.FileInfo;
import net.sf.openrocket.gui.ExportDecalDialog;
import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.FileUtils;
@ -87,7 +86,13 @@ public class DecalRegistry {
{
File exportedFile= exportedDecalMap.get(name);
if ( exportedFile != null ) {
rawIs = new FileInputStream(exportedFile);
try {
rawIs = new FileInputStream(exportedFile);
} catch (FileNotFoundException ex) {
// If we can no longer find the file, we'll try to resort to using a different loading
// strategy.
exportedDecalMap.remove(name);
}
}
}