Skip to content

Commit

Permalink
Fix boneheaded dictionary allocation oversight
Browse files Browse the repository at this point in the history
UnopenableArchives was lazy-loaded, but then we went and accessed the property every time we opened a zip entry, thus constructing it and negating the whole point of lazyh loading. Now we access it only if it's been constructed.
  • Loading branch information
FenPhoenix committed Aug 15, 2023
1 parent 8f48eb3 commit db410ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AL_Common/FastZipReader/ZipArchiveFast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private bool IsOpenable(ZipArchiveFastEntry entry, out string message)
{
message = "";

if (UnopenableArchives.TryGetValue(entry, out string result))
if (_unopenableArchives != null && _unopenableArchives.TryGetValue(entry, out string result))
{
message = result;
return false;
Expand Down

0 comments on commit db410ef

Please sign in to comment.