From 89a7f2aa800c18a2657a4b543224412ad3a12055 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Feb 2022 14:54:19 -0700 Subject: [PATCH] fix(essentials): Add a condition to check for an empty configuration.presentation object response and return to avoid null ref ex --- .../VideoCodec/CiscoCodec/CiscoSparkCodec.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index 39b3e167..d9baa070 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -856,6 +856,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco // Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value var conference = tempCodecStatus.Status.Conference; + if (conference.Presentation != null && conference.Presentation.LocalInstance == null) + { + // Handles an empty presentation object response + return; + } + if (conference.Presentation.LocalInstance.Count > 0) { if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))