summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT
diff options
context:
space:
mode:
authorPaul DiPietro <pauldipietro@users.noreply.github.com>2016-08-25 00:55:15 (GMT)
committerRui Marinho <me@ruimarinho.net>2016-08-25 00:55:15 (GMT)
commit96c194cb12cc119bd0f2baaaaab418a24fd00d94 (patch)
tree5effec314c1c4747c4866c5ae0c0ab90f2b9317d /Xamarin.Forms.Platform.WinRT
parentcb2bcdb84c45dad15cf470b798069f2ab301bf19 (diff)
downloadxamarin-forms-96c194cb12cc119bd0f2baaaaab418a24fd00d94.zip
xamarin-forms-96c194cb12cc119bd0f2baaaaab418a24fd00d94.tar.gz
xamarin-forms-96c194cb12cc119bd0f2baaaaab418a24fd00d94.tar.bz2
Fix regression by adding null check in Windows ListView selection (#314)
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT')
-rw-r--r--Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs b/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs
index 2cd8562..d65f7f6 100644
--- a/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs
@@ -538,7 +538,7 @@ namespace Xamarin.Forms.Platform.WinRT
// This is used for respecting ListView selection changes via keyboard, as the SelectedItem
// value is otherwise not set.
- if (Element.SelectedItem != List.SelectedItem)
+ if (Element.SelectedItem != null && Element.SelectedItem != List.SelectedItem)
{
((IElementController)Element).SetValueFromRenderer(ListView.SelectedItemProperty, List.SelectedItem);
}