Skip to content
This repository has been archived by the owner on Aug 7, 2022. It is now read-only.

Commit

Permalink
Fixed NUllReferenceException when no CompressionProgress was specified
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Nov 30, 2019
1 parent 793f171 commit b177339
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMODFramework/Classes/CompressionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ protected override string DecompressAll(Stream fileList, Stream compressedStream
compressedStream.Read(buffer, 0, 5);
decoder.SetDecoderProperties(buffer);
var progress = Framework.CompressionProgress;
progress.Init(sfs.Length, false);
progress?.Init(sfs.Length, false);
try
{
decoder.Code(compressedStream, sfs, compressedStream.Length - compressedStream.Position, sfs.Length,
Expand Down Expand Up @@ -451,7 +451,7 @@ protected override FileStream CompressAll(List<string> filePaths, CompressionLev
var fs = Utils.CreateTempFile();
coder.WriteCoderProperties(fs);
var progress = Framework.CompressionProgress;
progress.Init(sfs.Length, true);
progress?.Init(sfs.Length, true);

try
{
Expand Down

0 comments on commit b177339

Please sign in to comment.