diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-09-27 07:50:02 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-09-27 14:50:02 +0100 |
commit | 53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398 (patch) | |
tree | 7379dd4d3419a69018e4db910936a8cf146f33f5 /Xamarin.Forms.Platform.Android | |
parent | c83c830c68bc0da08f330457dc6901f1657b86f5 (diff) | |
download | xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.tar.gz xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.tar.bz2 xamarin-forms-53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398.zip |
Fix potential NRE accessing current application via Page.RealParent (#330)
* Fix potential NRE accessing current application via Page.RealParent
* Update Native Bindings Gallery to use MessagingCenter
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/AppCompat/Platform.cs | 2 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.Android/Platform.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/Platform.cs b/Xamarin.Forms.Platform.Android/AppCompat/Platform.cs index 0bad79b1..f656ff84 100644 --- a/Xamarin.Forms.Platform.Android/AppCompat/Platform.cs +++ b/Xamarin.Forms.Platform.Android/AppCompat/Platform.cs @@ -238,7 +238,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat Page.Platform = this; AddChild(Page, layout); - ((Application)Page.RealParent).NavigationProxy.Inner = this; + Application.Current.NavigationProxy.Inner = this; } void AddChild(Page page, bool layout = false) diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs index 4561fa8f..5ac1e451 100644 --- a/Xamarin.Forms.Platform.Android/Platform.cs +++ b/Xamarin.Forms.Platform.Android/Platform.cs @@ -413,7 +413,7 @@ namespace Xamarin.Forms.Platform.Android Page.Platform = this; AddChild(Page, layout); - ((Application)Page.RealParent).NavigationProxy.Inner = this; + Application.Current.NavigationProxy.Inner = this; _toolbarTracker.Target = newRoot; |