mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
handle null response from getPhase()
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
@@ -610,7 +610,14 @@ public final class CMatchUI
|
||||
public void updatePhase() {
|
||||
final PlayerView p = getGameView().getPlayerTurn();
|
||||
final PhaseType ph = getGameView().getPhase();
|
||||
final PhaseLabel lbl = p == null ? null : getFieldViewFor(p).getPhaseIndicator().getLabelFor(ph);
|
||||
// this should never happen, but I've seen it periodically... so, need to get to the bottom of it
|
||||
PhaseLabel lbl = null;
|
||||
if (ph != null ) {
|
||||
lbl = p == null ? null : getFieldViewFor(p).getPhaseIndicator().getLabelFor(ph);
|
||||
} else {
|
||||
// not sure what debugging information would help here, log for now
|
||||
System.err.println("getGameView().getPhase() returned 'null'");
|
||||
}
|
||||
|
||||
resetAllPhaseButtons();
|
||||
if (lbl != null) {
|
||||
|
||||
Reference in New Issue
Block a user