From 72e0b6ee1cc6d3e596d1aa09e04e5159ca7e176b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 30 Aug 2021 19:11:21 -0400 Subject: [PATCH] v1.0.3: fixed rare crashes when bundling tengu fire ability --- .../shatteredpixeldungeon/actors/mobs/Tengu.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java index 6f5bdf5fa..1444e50c5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java @@ -799,14 +799,14 @@ public class Tengu extends Mob { public void storeInBundle(Bundle bundle) { super.storeInBundle(bundle); bundle.put( DIRECTION, direction ); - bundle.put( CUR_CELLS, curCells ); + if (curCells != null) bundle.put( CUR_CELLS, curCells ); } @Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); direction = bundle.getInt( DIRECTION ); - curCells = bundle.getIntArray( CUR_CELLS ); + if (bundle.contains( CUR_CELLS )) curCells = bundle.getIntArray( CUR_CELLS ); } public static class FireBlob extends Blob {