v0.4.3b: adjusted how emo icons are handled to reduce null pointers

This commit is contained in:
Evan Debenham 2016-11-03 00:43:39 -04:00
parent ccb1dfe02e
commit 1c303a29fd

View File

@ -397,7 +397,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
} else {
hideSleep();
}
if (emo != null) {
if (emo != null && emo.alive) {
emo.visible = visible;
}
}
@ -418,7 +418,6 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
public void hideSleep() {
if (emo instanceof EmoIcon.Sleep) {
emo.killAndErase();
emo = null;
}
}
@ -437,7 +436,6 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
public void hideAlert() {
if (emo instanceof EmoIcon.Alert) {
emo.killAndErase();
emo = null;
}
}
@ -447,7 +445,6 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
if (emo != null) {
emo.killAndErase();
emo = null;
}
}