v0.4.1: fixed some crashes relating to rankings

This commit is contained in:
Evan Debenham 2016-07-18 03:42:35 -04:00 committed by Evan Debenham
parent 86a21563b0
commit 75295b811f

View File

@ -330,12 +330,9 @@ public enum Rankings {
heroClass = HeroClass.restoreInBundle( bundle );
armorTier = bundle.getInt( TIER );
if (bundle.contains(FILE)) {
gameFile = bundle.getString(FILE);
} else {
gameData = bundle.getBundle(DATA);
gameID = bundle.getString(ID);
}
if (bundle.contains(FILE)) gameFile = bundle.getString(FILE);
if (bundle.contains(DATA)) gameData = bundle.getBundle(DATA);
if (bundle.contains(ID)) gameID = bundle.getString(ID);
depth = bundle.getInt( DEPTH );
herolevel = bundle.getInt( LEVEL );
@ -356,8 +353,8 @@ public enum Rankings {
bundle.put( LEVEL, herolevel );
bundle.put( DEPTH, depth );
bundle.put( DATA, gameData );
bundle.put( ID, gameID);
if (gameData != null) bundle.put( DATA, gameData );
bundle.put( ID, gameID );
}
}