v2.2.0: added various safety checks to prevent rare crash errors

This commit is contained in:
Evan Debenham
2023-08-17 17:22:04 -04:00
parent 4be8b8b658
commit caaa820038
5 changed files with 35 additions and 22 deletions
@@ -79,9 +79,13 @@ public enum Sample {
@Override
public void run() {
for (String asset : toLoad) {
Sound newSound = Gdx.audio.newSound(Gdx.files.internal(asset));
synchronized (INSTANCE) {
ids.put(asset, newSound);
try {
Sound newSound = Gdx.audio.newSound(Gdx.files.internal(asset));
synchronized (INSTANCE) {
ids.put(asset, newSound);
}
} catch (Exception e){
Game.reportException(e);
}
}
}