소스 검색

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
             {