diff --git a/README.md b/README.md index a2b76de..d994718 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,4 @@ To complile to regular desktop Java for quick debugging, using native OpenGL for To modify the game's assets repository (javascript/assets.epk), make your changes in lwjgl-runtime/resources/ and use the Eclipse project located in epkcompiler/ to regenerate the assets.epk file and copy it to the Javascript directory. -This project is just a proof of concept to show what can be accomplished by a skilled developer using TeaVM. It is not very fast or stable, and the only real useful portion is the emulator code which creates a makeshift fixed function OpenGL 1.3 context using webgl (based on OpenGL 3.3) operational in the browser. Maybe it can be used to port other games in the future. +this project is just a proof of concept to show what can be accomplished when using TeaVM to cross compile an existing java program to javascript. It is not very fast or stable, and the only real useful portion is the emulator code which creates a makeshift fixed function OpenGL 1.3 context using webgl (based on OpenGL 3.3) operational in the browser. Maybe it can be used to port other games in the future. diff --git a/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java b/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java index b51123f..9d329a2 100644 --- a/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java @@ -1114,6 +1114,7 @@ public class EaglerAdapterImpl2 { AudioBufferX ret = loadedSoundFiles.get(fileName); if(ret == null) { byte[] file = loadResourceBytes(fileName); + if(file == null) return null; Uint8Array buf = Uint8Array.create(file.length); buf.set(file); ret = new AudioBufferX(decodeAudioAsync(buf.getBuffer()));