Skip to content

Commit 9827405

Browse files
committed
Fix null reference exception when writing resource files
1 parent aff9649 commit 9827405

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@ protected virtual IEnumerable<ProjectItemInfo> WriteResourceFilesInProject(Metad
337337
foreach (var r in module.Resources.Where(r => r.ResourceType == ResourceType.Embedded))
338338
{
339339
Stream stream = r.TryOpenStream();
340+
if (stream == null)
341+
continue;
342+
340343
stream.Position = 0;
341344

342345
if (r.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase))

0 commit comments

Comments
 (0)