Skip to content

Commit

Permalink
Protect against UpdatePathCacheToID failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael P. Starkweather committed Jan 13, 2019
1 parent 6922d20 commit 88d8c9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ModTek/ModTek.cs
Expand Up @@ -315,7 +315,7 @@ internal static void UpdatePathCacheToID<T>(Dictionary<string, T> cache)
{
var id = Path.GetFileNameWithoutExtension(path);

if (id == path)
if (id == path || toAdd.ContainsKey(id) || cache.ContainsKey(id))
continue;

toAdd[id] = cache[path];
Expand Down

0 comments on commit 88d8c9f

Please sign in to comment.