mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
prevent NPE VAvatar.java
This commit is contained in:
@@ -124,7 +124,7 @@ public class VAvatar extends FDisplayObject {
|
|||||||
float w = isHovered() ? getWidth()/16f+getWidth() : getWidth();
|
float w = isHovered() ? getWidth()/16f+getWidth() : getWidth();
|
||||||
float h = isHovered() ? getWidth()/16f+getHeight() : getHeight();
|
float h = isHovered() ? getWidth()/16f+getHeight() : getHeight();
|
||||||
|
|
||||||
if (avatarAnimation != null && !MatchController.instance.getGameView().isMatchOver()) {
|
if (avatarAnimation != null && MatchController.instance.getGameView() != null && !MatchController.instance.getGameView().isMatchOver()) {
|
||||||
if (player.wasAvatarLifeChanged()) {
|
if (player.wasAvatarLifeChanged()) {
|
||||||
avatarAnimation.start();
|
avatarAnimation.start();
|
||||||
avatarAnimation.drawAvatar(g, image, 0, 0, w, h);
|
avatarAnimation.drawAvatar(g, image, 0, 0, w, h);
|
||||||
|
|||||||
Reference in New Issue
Block a user