mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge branch 'master' into 'master'
prevent NPE See merge request core-developers/forge!4085
This commit is contained in:
@@ -64,8 +64,6 @@ public class PlayerView extends GameEntityView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getLobbyPlayerName() {
|
public String getLobbyPlayerName() {
|
||||||
if (get(TrackableProperty.LobbyPlayerName) == null)
|
|
||||||
return ""; //todo find the root cause why this would return null after succesful start of game and could freeze the UI?
|
|
||||||
return get(TrackableProperty.LobbyPlayerName);
|
return get(TrackableProperty.LobbyPlayerName);
|
||||||
}
|
}
|
||||||
void updateLobbyPlayerName(Player p) {
|
void updateLobbyPlayerName(Player p) {
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void awaitNextInput() {
|
public final void awaitNextInput() {
|
||||||
if (awaitNextInputTimer == null) {
|
if (awaitNextInputTimer == null && currentPlayer != null) { //Prevent NPE currentPlayer
|
||||||
awaitNextInputTimer = new Timer("awaitNextInputTimer Game:" + this.gameView.getId() + " Player:" + this.currentPlayer.getLobbyPlayerName());
|
awaitNextInputTimer = new Timer("awaitNextInputTimer Game:" + this.gameView.getId() + " Player:" + this.currentPlayer.getLobbyPlayerName());
|
||||||
}
|
}
|
||||||
//delay updating prompt to await next input briefly so buttons don't flicker disabled then enabled
|
//delay updating prompt to await next input briefly so buttons don't flicker disabled then enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user