Преглед изворни кода

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

BDisp пре 1 месец
родитељ
комит
48d4de2e63
1 измењених фајлова са 1 додато и 1 уклоњено
  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
             {