Skip to content

Commit

Permalink
Fixed NRE on serializing a null VValue
Browse files Browse the repository at this point in the history
  • Loading branch information
shravan2x committed Aug 29, 2017
1 parent 9ad57db commit 64a8d5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Gameloop.Vdf/VValue.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Gameloop.Vdf
using System;

namespace Gameloop.Vdf
{
public class VValue : VToken
{
Expand All @@ -16,7 +18,7 @@ public override void WriteTo(VdfWriter writer)

public override string ToString()
{
return Value.ToString();
return Value?.ToString() ?? String.Empty;
}
}
}

0 comments on commit 64a8d5e

Please sign in to comment.