Browse Source

Fixes #4214. Annoying sporadic System.NullReferenceException in WindowsConsole (#4215)

BDisp 1 tháng trước cách đây
mục cha
commit
48d4de2e63
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Terminal.Gui/Drivers/WindowsDriver/WindowsConsole.cs

+ 1 - 1
Terminal.Gui/Drivers/WindowsDriver/WindowsConsole.cs

@@ -62,7 +62,7 @@ internal partial class WindowsConsole
         InputRecord inputRecord = default;
         uint numberEventsRead = 0;
 
-        while (!_inputReadyCancellationTokenSource!.IsCancellationRequested)
+        while (_inputReadyCancellationTokenSource is { IsCancellationRequested: false })
         {
             try
             {