virtual_list_size = value;
if (virtual_mode) {
+ focused_item_index = -1;
selected_indices.Reset ();
Redraw (true);
}
owner.UpdateMultiSelection (clicked_item.DisplayIndex, reselect);
} else {
clicked_item.Selected = true;
+ // Side-effects to setting Selected can possibly result in ItemsMouseUp() being called
+ // and clicked_item being set to null. (See Xamarin bug 23591.) In such a case, assume
+ // that there's nothing more we can do here.
+ if (clicked_item == null)
+ return;
}
if (owner.VirtualMode && changed) {