diff --git a/lib/change_detection/dirty_checking_change_detector.dart b/lib/change_detection/dirty_checking_change_detector.dart index eaf91e06a..cb8ab2a05 100644 --- a/lib/change_detection/dirty_checking_change_detector.dart +++ b/lib/change_detection/dirty_checking_change_detector.dart @@ -1001,7 +1001,7 @@ class _CollectionChangeRecord implements CollectionChangeRecord { _linkedRecords.put(record); } - prev._next = null; + if (prev != null) prev._next = null; _itTail = prev; _undoDeltas(); }