fix(essentials): Add a condition to check for an empty configuration.presentation object response and return to avoid null ref ex

This commit is contained in:
Neil Dorin
2022-02-09 14:54:19 -07:00
parent 90023621dc
commit 89a7f2aa80

View File

@@ -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))