Skip to content

Commit

Permalink
Output: Fix thread safety crash in WriteFilesByClassTree
Browse files Browse the repository at this point in the history
  • Loading branch information
Katy Coe committed Feb 10, 2020
1 parent 2487b94 commit 97c8b8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public HashSet<Assembly> WriteFilesByClassTree(string outPath, bool separateAttr
used.Add(type.Assembly);
return used;
},
usedPartition => usedAssemblies.UnionWith(usedPartition)
usedPartition => {
lock (usedAssemblies) usedAssemblies.UnionWith(usedPartition);
}
);

if (separateAttributes && usedAssemblies.Any())
Expand Down

0 comments on commit 97c8b8f

Please sign in to comment.