Browse Source

Prevent System.NullReferenceException.

BDisp 1 năm trước cách đây
mục cha
commit
d7b0899f2b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Terminal.Gui/Views/ListView.cs

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

@@ -848,7 +848,7 @@ namespace Terminal.Gui {
 
 		void CheckAndResizeMarksIfRequired ()
 		{
-			if (count != src.Count) {
+			if (src != null && count != src.Count) {
 				count = src.Count;
 				BitArray newMarks = new BitArray (count);
 				for (var i = 0; i < Math.Min (marks.Length, newMarks.Length); i++) {