Browse Source

Fix null reference exception when writing resource files

pull/3474/head
ds5678 1 month ago
parent
commit
9827405f02
  1. 3
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

3
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

@ -337,6 +337,9 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
foreach (var r in module.Resources.Where(r => r.ResourceType == ResourceType.Embedded))
{
Stream stream = r.TryOpenStream();
if (stream == null)
continue;
stream.Position = 0;
if (r.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase))

Loading…
Cancel
Save