v0.4.3a: properly fixed a null pointer with toasts (i hope)
This commit is contained in:
parent
ae8eb8f62b
commit
ac3439d0e5
|
@ -548,7 +548,7 @@ public class GameScene extends PixelScene {
|
||||||
sprite.link( mob );
|
sprite.link( mob );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prompt( String text ) {
|
private synchronized void prompt( String text ) {
|
||||||
|
|
||||||
if (prompt != null) {
|
if (prompt != null) {
|
||||||
prompt.killAndErase();
|
prompt.killAndErase();
|
||||||
|
|
|
@ -81,8 +81,7 @@ 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
|
||||||
if (text != null)
|
text.destroy();
|
||||||
text.destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void text( String txt ) {
|
public void text( String txt ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user