v0.9.1c: added various safety checks to prevent crashes
This commit is contained in:
parent
0cec93ade6
commit
8fafe2af57
|
@ -154,7 +154,7 @@ public class RingOfWealth extends Ring {
|
|||
private static int latestDropTier = 0;
|
||||
|
||||
public static void showFlareForBonusDrop( Visual vis ){
|
||||
if (vis == null) return;
|
||||
if (vis == null || vis.parent == null) return;
|
||||
switch (latestDropTier){
|
||||
default:
|
||||
break; //do nothing
|
||||
|
|
|
@ -173,7 +173,7 @@ public class GameScene extends PixelScene {
|
|||
@Override
|
||||
public void create() {
|
||||
|
||||
if (Dungeon.hero == null){
|
||||
if (Dungeon.hero == null || Dungeon.level == null){
|
||||
ShatteredPixelDungeon.switchNoFade(TitleScene.class);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,8 @@ public class PixelScene extends Scene {
|
|||
banner.camera = uiCamera;
|
||||
banner.x = align( banner.camera, (banner.camera.width - banner.width) / 2 );
|
||||
banner.y = align( banner.camera, (banner.camera.height - banner.height) / 3 );
|
||||
Game.scene().add( banner );
|
||||
Scene s = Game.scene();
|
||||
if (s != null) s.add( banner );
|
||||
}
|
||||
|
||||
protected static class Fader extends ColorBlock {
|
||||
|
|
Loading…
Reference in New Issue
Block a user