Skip to content
Permalink
Browse files

Quick fix as suggested by @xen2 in chat to avoid crash in shader comp…

…iler (#343)
  • Loading branch information
tebjan authored and xen2 committed Jan 23, 2019
1 parent 2982d61 commit d2b09f9259c2991e3aca05122a430ae8e5f0abf5
Showing with 2 additions and 2 deletions.
  1. +2 −2 sources/shaders/Xenko.Core.Shaders/Ast/TypeBase.cs
@@ -215,7 +215,7 @@ public override bool Equals(object obj)
/// </returns>
public override int GetHashCode()
{
return Name.GetHashCode();
return Name?.GetHashCode() ?? 0;
}

/// <summary>
@@ -226,7 +226,7 @@ public override int GetHashCode()
/// </returns>
public override string ToString()
{
return Name.ToString();
return Name?.ToString();
}

#endregion

0 comments on commit d2b09f9

Please sign in to comment.
You can’t perform that action at this time.