Selaa lähdekoodia

Prevent System.NullReferenceException.

BDisp 1 vuosi sitten
vanhempi
commit
d7b0899f2b
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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++) {