Skip to content

Commit

Permalink
Fix null reference exception then accessing viewstate
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-yagodin committed Nov 3, 2015
1 parent 74e51de commit 80057ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R7.University/components/XmlSerializationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static class XmlSerializationHelper

public static T Deserialize<T> (object value) where T: class, new()
{
if (!string.IsNullOrEmpty (value.ToString ()))
if (value != null && !string.IsNullOrEmpty (value.ToString ()))
{
var xmlSerializer = new XmlSerializer (typeof (T));
var stringReader = new StringReader (value.ToString ());
Expand Down

0 comments on commit 80057ea

Please sign in to comment.