Browse Source

Fixed always sending an exception when recovering a crash report

CPKreuz 4 months ago
parent
commit
b41ded01d8
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/PixiEditor/ViewModels/SubViewModels/FileViewModel.cs

+ 7 - 2
src/PixiEditor/ViewModels/SubViewModels/FileViewModel.cs

@@ -441,8 +441,13 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
                 }
             }
 
-            var exceptions = new[] { firstException, secondException, thirdException };
-            CrashHelper.SendExceptionInfo(new AggregateException(exceptions.Where(x => x != null).ToArray()));
+            var exceptions = new[] { firstException, secondException, thirdException }
+                .Where(x => x != null).ToArray();
+
+            if (exceptions.Length > 0)
+            {
+                CrashHelper.SendExceptionInfo(new AggregateException(exceptions));
+            }
         }
 
         showMissingFilesDialog = documents.Count != i;