Browse Source

Merge pull request #3474 from ds5678/fix-null-reference-exception-when-writing-resource-files

Fix null reference exception when writing resource files
pull/3471/head
Daniel Grunwald 1 month ago committed by GitHub
parent
commit
8e7e018ec0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

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

@ -337,6 +337,9 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -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