File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/Core/src/Platform/iOS Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,10 @@ internal static void InvalidateAncestorsMeasures(this UIView child)
320320 }
321321
322322 var superview = child . Superview ;
323+ if ( superview is null )
324+ {
325+ return ;
326+ }
323327
324328 // Now invalidate the parent view
325329 var superviewMauiPlatformLayout = superview as IMauiPlatformView ;
@@ -334,7 +338,7 @@ internal static void InvalidateAncestorsMeasures(this UIView child)
334338
335339 // Potential improvement: if the MAUI view (superview here) is constrained to a fixed size, we could stop propagating
336340 // when doing this, we must pay attention to a scenario where a non-fixed-size view becomes fixed-size
337- if ( superview is null or PageView or UIScrollView )
341+ if ( superview is PageView or UIScrollView )
338342 {
339343 // We reached the root view or a scrollable area (includes collection view), stop propagating
340344 // The view will eventually watch its content size and invoke InvalidateMeasure when needed
You can’t perform that action at this time.
0 commit comments