summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.Platform.iOS/ContextActionCell.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/ContextActionCell.cs b/Xamarin.Forms.Platform.iOS/ContextActionCell.cs
index bb7bea1a..74f354c5 100644
--- a/Xamarin.Forms.Platform.iOS/ContextActionCell.cs
+++ b/Xamarin.Forms.Platform.iOS/ContextActionCell.cs
@@ -661,8 +661,10 @@ namespace Xamarin.Forms.Platform.iOS
{
var selector = (SelectGestureRecognizer)recognizer;
- var table = (UITableView)recognizer.View;
+ if (selector._lastPath == null)
+ return;
+ var table = (UITableView)recognizer.View;
if (!selector._lastPath.Equals(table.IndexPathForSelectedRow))
table.SelectRow(selector._lastPath, false, UITableViewScrollPosition.None);
table.Source.RowSelected(table, selector._lastPath);