From 14282c47405d99a5e8512428c44e3e70fda2e03f Mon Sep 17 00:00:00 2001 From: goyuken Date: Fri, 15 Aug 2014 15:52:08 +0000 Subject: [PATCH] fix issue 249 --- BizHawk.Client.Common/config/ConfigService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/config/ConfigService.cs b/BizHawk.Client.Common/config/ConfigService.cs index b58d155ffa..49cda3e79a 100644 --- a/BizHawk.Client.Common/config/ConfigService.cs +++ b/BizHawk.Client.Common/config/ConfigService.cs @@ -86,7 +86,12 @@ namespace BizHawk.Client.Common using (JsonTextReader jr = new JsonTextReader(tr)) { TypeNameEncapsulator tne = (TypeNameEncapsulator)Serializer.Deserialize(jr, typeof(TypeNameEncapsulator)); - return tne.o; + // in the case of trying to deserialize nothing, tne will be nothing + // we want to return nothing + if (tne != null) + return tne.o; + else + return null; } }