Skip to content

Commit

Permalink
rtptools: Source list never null as it causes exception in finally then
Browse files Browse the repository at this point in the history
  • Loading branch information
dimhotepus committed Nov 16, 2023
1 parent 5173fad commit 404dfc0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions RtpTools/RtpSend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,8 @@ internal static string ToTextualConvention(Rtcp.GoodbyeReport bye)
//Write each entry in bye.GetSourceList
using (var sourceList = bye.GetSourceList())
{
if (sourceList == null) blockString += "#Incomplete Source List Not Included" + (char)Common.ASCII.LineFeed;
else foreach (uint partyId in sourceList)//ssrc=
blockString += string.Format(HexFormat, "ssrc", HexSpecifier + partyId.ToString("X"), (char)Common.ASCII.LineFeed);
foreach (uint partyId in sourceList)//ssrc=
blockString += string.Format(HexFormat, "ssrc", HexSpecifier + partyId.ToString("X"), (char)Common.ASCII.LineFeed);
}

return blockString;
Expand Down

0 comments on commit 404dfc0

Please sign in to comment.