Browse Source

Fixed unit tests failure caused by BackgroundWorkerCollection

Tig 1 year ago
parent
commit
8487e78cf3
1 changed files with 5 additions and 0 deletions
  1. 5 0
      UICatalog/Scenarios/BackgroundWorkerCollection.cs

+ 5 - 0
UICatalog/Scenarios/BackgroundWorkerCollection.cs

@@ -174,6 +174,11 @@ public class BackgroundWorkerCollection : Scenario
 
         private void OverlappedMain_Activate (object sender, ToplevelEventArgs top)
         {
+            if (top.Toplevel is null)
+            {
+                return;
+            }
+
             _workerApp?.WriteLog ($"{top.Toplevel.Data} activate.");
         }