Skip to content

Commit 55ccbc2

Browse files
committed
Return empty BList instead of null for AnnounceList
1 parent ca6eafa commit 55ccbc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BencodeNET.Net45/Objects/TorrentFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public string Announce
3131

3232
public BList AnnounceList
3333
{
34-
get { return (BList) _data[Fields.AnnounceList]; }
34+
get { return (BList) _data[Fields.AnnounceList] ?? new BList(); }
3535
set { _data[Fields.AnnounceList] = value; }
3636
}
3737

0 commit comments

Comments
 (0)