From aff5247f31be336c28dde4a41a5299fa9952f049 Mon Sep 17 00:00:00 2001 From: guyluz Date: Fri, 28 Apr 2023 14:59:04 +0300 Subject: [PATCH] Fix null crash for chromecast device --- .../devices/google/chrome_cast/chrome_cast_entity.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/infrastructure/devices/google/chrome_cast/chrome_cast_entity.dart b/lib/infrastructure/devices/google/chrome_cast/chrome_cast_entity.dart index ea5887fe..b10e1019 100644 --- a/lib/infrastructure/devices/google/chrome_cast/chrome_cast_entity.dart +++ b/lib/infrastructure/devices/google/chrome_cast/chrome_cast_entity.dart @@ -86,6 +86,10 @@ class ChromeCastEntity extends GenericSmartTvDE { Future setUpNodeRedApi() async { // TODO: add check to add uniqueId + action as flow in node read only if missing + if (lastKnownIp == null) { + logger.w('Chromecast last known ip is null'); + return; + } chromecastNodeRedApi = ChromecastNodeRedApi(); chromecastNodeRedApi.setNewYoutubeVideoNodes( uniqueId.getOrCrash(),