Prevent System.NullReferenceException.

This commit is contained in:
BDisp
2024-05-26 17:39:34 +01:00
parent 87ea75b3c1
commit d7b0899f2b

View File

@@ -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++) {