v0.6.1b: added a safety check to dungeon.loadlevel
This commit is contained in:
parent
0b417a09b9
commit
51ec4a4039
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user