From ac583b87b89cb708bdd9502c69bbe1ab4751289f Mon Sep 17 00:00:00 2001 From: Kurt Aaholst Date: Fri, 11 Oct 2024 23:50:18 +0200 Subject: [PATCH] Handle menu status event when no active player --- .../main/java/uk/org/ngo/squeezer/service/ConnectionState.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Squeezer/src/main/java/uk/org/ngo/squeezer/service/ConnectionState.java b/Squeezer/src/main/java/uk/org/ngo/squeezer/service/ConnectionState.java index a8351db7..f31493d1 100644 --- a/Squeezer/src/main/java/uk/org/ngo/squeezer/service/ConnectionState.java +++ b/Squeezer/src/main/java/uk/org/ngo/squeezer/service/ConnectionState.java @@ -266,7 +266,8 @@ public RandomPlay getRandomPlay(Player player) { // For menu updates sent from LMS, handling of archived nodes needs testing! void menuStatusEvent(MenuStatusMessage event) { - if (event.playerId.equals(getActivePlayer().getId())) { + Player activePlayer = getActivePlayer(); + if (activePlayer != null && event.playerId.equals(activePlayer.getId())) { mHomeMenuHandling.handleMenuStatusEvent(event); } }