Skip to content

Commit 91d2cfa

Browse files
committed
Fix a failure?
1 parent 937d61f commit 91d2cfa

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Terminal.Gui/View/View.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,15 @@ public void Dispose ()
507507
#if DEBUG_IDISPOSABLE
508508
WasDisposed = true;
509509

510-
foreach (View instance in Instances.Where (x => x.WasDisposed).ToList ())
510+
foreach (View? instance in Instances.Where (x =>
511+
{
512+
if (x is { })
513+
{
514+
return x.WasDisposed;
515+
}
516+
517+
return false;
518+
}).ToList ())
511519
{
512520
Instances.Remove (instance);
513521
}

Tests/UnitTestsParallelizable/Input/ResponderTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ namespace Terminal.Gui.InputTests;
44

55
public class ResponderTests
66
{
7-
8-
97
[Fact]
108
public void KeyPressed_Handled_True_Cancels_KeyPress ()
119
{

0 commit comments

Comments
 (0)