diff --git a/Core/Repositories/ProgressScalePercentsByFileSize.cs b/Core/Repositories/ProgressScalePercentsByFileSize.cs index bd6a1c9034..599b8165cc 100644 --- a/Core/Repositories/ProgressScalePercentsByFileSize.cs +++ b/Core/Repositories/ProgressScalePercentsByFileSize.cs @@ -35,7 +35,7 @@ public void Report(int currentFilePercent) // Only report each percentage once, to avoid spamming UI calls if (percent > lastPercent) { - percentProgress.Report(percent); + percentProgress?.Report(percent); lastPercent = percent; } } @@ -51,7 +51,7 @@ public void NextFile() ++currentIndex; if (basePercent > lastPercent) { - percentProgress.Report(basePercent); + percentProgress?.Report(basePercent); lastPercent = basePercent; } }