Skip to content

Commit a3a8b29

Browse files
committed
Avoid exception while reading a torrent without CreationDate.
1 parent a6f3cca commit a3a8b29

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
@@ -36,7 +36,7 @@ public DateTime CreationDate
3636
{
3737
get
3838
{
39-
var unixTime = (BNumber) Value[Fields.CreationDate];
39+
var unixTime = (BNumber) Value[Fields.CreationDate] ?? 0;
4040
return _epoch.AddSeconds(unixTime);
4141
}
4242
set

0 commit comments

Comments
 (0)