Skip to content

Commit

Permalink
fix #3372 empty tree for assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
trivalik committed Jan 16, 2025
1 parent 15d8ed1 commit 9f6f1ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ICSharpCode.ILSpyX/LoadedAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async Task<LoadResult> LoadAsync(Task<Stream?>? streamTask)
}
}

if (result?.IsSuccess != true)
if (result?.IsSuccess != true || result.Package?.Kind == LoadedPackage.PackageKind.Zip) // workaround to check this before zip
{
stream.Position = 0;
try
Expand All @@ -367,7 +367,8 @@ async Task<LoadResult> LoadAsync(Task<Stream?>? streamTask)
}
catch (Exception ex)
{
result = new LoadResult { FileLoadException = ex };
if (result == null)
result = new LoadResult { FileLoadException = ex };
}
}

Expand Down

0 comments on commit 9f6f1ee

Please sign in to comment.