Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 1bae35d

Browse files
authored
Fixing NRE in ContextActionCell (#11944) fixes #11943
1 parent 67a216d commit 1bae35d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Xamarin.Forms.Platform.iOS/ContextActionCell.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ void OnCellPropertyChanged(object sender, PropertyChangedEventArgs e)
485485

486486
void OnContextItemsChanged(object sender, NotifyCollectionChangedEventArgs e)
487487
{
488-
var parentListView = _cell.RealParent as ListView;
488+
var parentListView = _cell?.RealParent as ListView;
489489
var recycling = parentListView != null &&
490490
((parentListView.CachingStrategy & ListViewCachingStrategy.RecycleElement) != 0);
491491
if (recycling)

0 commit comments

Comments
 (0)