v0.4.3a: fixed a couple null pointer exceptions

This commit is contained in:
Evan Debenham 2016-10-19 19:58:10 -04:00
parent 509f10a12c
commit 93caf1f1eb
2 changed files with 3 additions and 2 deletions

View File

@ -801,7 +801,7 @@ public class GameScene extends PixelScene {
public static void ready() { public static void ready() {
selectCell( defaultCellListener ); selectCell( defaultCellListener );
QuickSlotButton.cancel(); QuickSlotButton.cancel();
scene.toolbar.examining = false; if (scene != null) scene.toolbar.examining = false;
} }
public static void examineCell( Integer cell ) { public static void examineCell( Integer cell ) {

View File

@ -81,7 +81,8 @@ public class Toast extends Component {
public synchronized void kill() { public synchronized void kill() {
super.kill(); super.kill();
//need to also destroy the text so that memory is freed //need to also destroy the text so that memory is freed
text.destroy(); if (text != null)
text.destroy();
} }
public void text( String txt ) { public void text( String txt ) {