From b57acd19bb511348e9c7c5b91ab4f2fbee55a687 Mon Sep 17 00:00:00 2001 From: Benjamin Pracht Date: Wed, 27 Nov 2024 11:36:14 -0800 Subject: [PATCH] nil check --- test/ffprobe.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/ffprobe.go b/test/ffprobe.go index efc61ae8..561ff493 100644 --- a/test/ffprobe.go +++ b/test/ffprobe.go @@ -122,12 +122,14 @@ func verify(t *testing.T, in string, p *config.PipelineConfig, res *livekit.Egre } // Check source type - if p.RequestType == types.RequestTypeRoomComposite && (p.VideoEnabled || p.Layout != "") { - require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType) - } else if p.RequestType == types.RequestTypeWeb { - require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType) - } else if res != nil { - require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_SDK, res.SourceType) + if res != nil { + if p.RequestType == types.RequestTypeRoomComposite && (p.VideoEnabled || p.Layout != "") { + require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType) + } else if p.RequestType == types.RequestTypeWeb { + require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType) + } else { + require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_SDK, res.SourceType) + } } switch egressType {