浏览代码

Fixes #4211. Annoying sporadic System.NullReferenceException in NetEvents (#4213)

BDisp 1 月之前
父节点
当前提交
847123aa00
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Terminal.Gui/Drivers/NetDriver/NetEvents.cs

+ 1 - 1
Terminal.Gui/Drivers/NetDriver/NetEvents.cs

@@ -50,7 +50,7 @@ internal class NetEvents : IDisposable
 
     public InputResult? DequeueInput ()
     {
-        while (!_netEventsDisposed.Token.IsCancellationRequested)
+        while (_netEventsDisposed is { Token.IsCancellationRequested: false })
         {
             _winChange.Set ();