From 64a8d5eecb25f03510897e24919cfed434b00f49 Mon Sep 17 00:00:00 2001 From: Shravan Rajinikanth Date: Mon, 28 Aug 2017 20:18:25 -0500 Subject: [PATCH] Fixed NRE on serializing a null VValue --- Gameloop.Vdf/VValue.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gameloop.Vdf/VValue.cs b/Gameloop.Vdf/VValue.cs index ac0b313..30648bf 100644 --- a/Gameloop.Vdf/VValue.cs +++ b/Gameloop.Vdf/VValue.cs @@ -1,4 +1,6 @@ -namespace Gameloop.Vdf +using System; + +namespace Gameloop.Vdf { public class VValue : VToken { @@ -16,7 +18,7 @@ public override void WriteTo(VdfWriter writer) public override string ToString() { - return Value.ToString(); + return Value?.ToString() ?? String.Empty; } } }