瀏覽代碼

Avoids throw if table is null.

BDisp 1 年之前
父節點
當前提交
d796c5ac43
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Terminal.Gui/Views/TableView/TableView.cs

+ 1 - 1
Terminal.Gui/Views/TableView/TableView.cs

@@ -2119,7 +2119,7 @@ public class TableView : View
     )
     {
         // if the column index provided is out of bounds
-        if (columnIndex < 0 || columnIndex >= table.Columns)
+        if (table is null || columnIndex < 0 || columnIndex >= table.Columns)
         {
             idx = columnIndex;