From dc97c9677e3e6a9b04830f375e7c555a23d37220 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 27 Jan 2025 12:21:19 -0500 Subject: [PATCH] #5163 Don't crash if no FPP configured --- xLights/controllers/FPP.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/xLights/controllers/FPP.cpp b/xLights/controllers/FPP.cpp index 0eaa97dc4..ab5c55f8e 100644 --- a/xLights/controllers/FPP.cpp +++ b/xLights/controllers/FPP.cpp @@ -3843,13 +3843,15 @@ void FPP::MapToFPPInstances(Discovery& discovery, std::list& instances, Ou }; for (auto& it : discovery.GetOutputManager()->GetControllers()) { auto c = dynamic_cast(it); - configuredIPs[c->GetResolvedIP()] = c->GetIP(); - if (!c->GetFPPProxy().empty()) { - auto ip = ip_utils::ResolveIP(c->GetFPPProxy()); - allProxyList.insert(ip); - } - if (Controller::DecodeActiveState(c->GetActive()) == "Active") { - foundActiveController = true; + if (c != nullptr) { + configuredIPs[c->GetResolvedIP()] = c->GetIP(); + if (!c->GetFPPProxy().empty()) { + auto ip = ip_utils::ResolveIP(c->GetFPPProxy()); + allProxyList.insert(ip); + } + if (Controller::DecodeActiveState(c->GetActive()) == "Active") { + foundActiveController = true; + } } } for (auto res : discovery.GetResults()) {