diff --git a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs index 9da400f..5fff26d 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs @@ -288,7 +288,7 @@ namespace CodeWalker.GameFiles { } NameHash = _CMapTypes.name; - if (NameHash == 0) + if ((NameHash == 0) && (entry.NameLower != null)) { int ind = entry.NameLower.LastIndexOf('.'); if (ind > 0) diff --git a/CodeWalker.Core/GameFiles/Utils/Jenk.cs b/CodeWalker.Core/GameFiles/Utils/Jenk.cs index 4129e96..00164e8 100644 --- a/CodeWalker.Core/GameFiles/Utils/Jenk.cs +++ b/CodeWalker.Core/GameFiles/Utils/Jenk.cs @@ -57,6 +57,7 @@ namespace CodeWalker.GameFiles public static uint GenHash(string text) { + if (text == null) return 0; uint h = 0; for (int i = 0; i < text.Length; i++) {