diff options
author | Rui Marinho <me@ruimarinho.net> | 2017-03-22 19:38:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-22 19:38:19 +0000 |
commit | 16fcac8cf52ab960e7354a52864b0a72aefdfc1f (patch) | |
tree | 8817ca8c2d0b3c661c6e055ef39e6a753b74e4b8 /Xamarin.Forms.Platform.Android | |
parent | ebc978b6961817ea61d6d6d349a5853c46df903f (diff) | |
download | xamarin-forms-16fcac8cf52ab960e7354a52864b0a72aefdfc1f.tar.gz xamarin-forms-16fcac8cf52ab960e7354a52864b0a72aefdfc1f.tar.bz2 xamarin-forms-16fcac8cf52ab960e7354a52864b0a72aefdfc1f.zip |
[Android] Fix NRE on Picker (#834)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs index 9587d0ad..0727807e 100644 --- a/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs +++ b/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs @@ -111,7 +111,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat _dialog.SetCanceledOnTouchOutside(true); _dialog.DismissEvent += (sender, args) => { - ((IElementController)Element).SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); + (Element as IElementController)?.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); _dialog.Dispose(); _dialog = null; }; |