Fixed occasional NPE

This commit is contained in:
Brendan Robert 2015-12-20 22:43:30 -06:00
parent 893052b004
commit d03c1d9333

View File

@ -2,9 +2,9 @@ package jace.assembly;
import jace.Emulator; import jace.Emulator;
import jace.core.RAM; import jace.core.RAM;
import jace.ide.Program;
import jace.ide.CompileResult; import jace.ide.CompileResult;
import jace.ide.LanguageHandler; import jace.ide.LanguageHandler;
import jace.ide.Program;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
@ -53,6 +53,8 @@ public class AssemblyHandler implements LanguageHandler<File> {
@Override @Override
public void clean(CompileResult<File> lastResult) { public void clean(CompileResult<File> lastResult) {
lastResult.getCompiledAsset().delete(); if (lastResult.getCompiledAsset() != null) {
lastResult.getCompiledAsset().delete();
}
} }
} }