v0.6.1b: added a safety check to dungeon.loadlevel

This commit is contained in:
Evan Debenham 2017-08-22 23:58:48 -04:00
parent 0b417a09b9
commit 51ec4a4039

View File

@ -677,7 +677,13 @@ public class Dungeon {
Bundle bundle = Bundle.read( input );
input.close();
return (Level)bundle.get( LEVEL );
Level level = (Level)bundle.get( LEVEL );
if (level == null){
throw new IOException();
} else {
return level;
}
}
public static void deleteGame( HeroClass cl, boolean deleteLevels ) {