v0.3.4: added a couple null safety checks
This commit is contained in:
parent
8c8e96561b
commit
5d7df4abd4
|
@ -615,9 +615,13 @@ public class GameScene extends PixelScene {
|
|||
}
|
||||
|
||||
public static Ripple ripple( int pos ) {
|
||||
Ripple ripple = (Ripple)scene.ripples.recycle( Ripple.class );
|
||||
ripple.reset( pos );
|
||||
return ripple;
|
||||
if (scene != null) {
|
||||
Ripple ripple = (Ripple) scene.ripples.recycle(Ripple.class);
|
||||
ripple.reset(pos);
|
||||
return ripple;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static SpellSprite spellSprite() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user