mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
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:
@@ -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
|
// Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value
|
||||||
var conference = tempCodecStatus.Status.Conference;
|
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 (conference.Presentation.LocalInstance.Count > 0)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))
|
if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))
|
||||||
|
|||||||
Reference in New Issue
Block a user