From eb3db860e47da2974bddf6f0f959799f12e962c5 Mon Sep 17 00:00:00 2001 From: App Bureauet Date: Thu, 6 Apr 2017 23:11:05 +0200 Subject: OnResume assumed that _application had been set (#859) When OnResume is called it should not expect the _application to be set already. I have an app where I use one activity for showing a splash screen and then it starts an intent to show the main activity containing the application. This used to work before 2.3.4.224. --- Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Xamarin.Forms.Platform.Android') diff --git a/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs b/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs index 4ca0eab8..8bba063b 100644 --- a/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs +++ b/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs @@ -236,7 +236,7 @@ namespace Xamarin.Forms.Platform.Android // counterpart to OnPause base.OnResume(); - if (_application.OnThisPlatform().GetShouldPreserveKeyboardOnResume()) + if (_application != null && _application.OnThisPlatform().GetShouldPreserveKeyboardOnResume()) { if (CurrentFocus != null && (CurrentFocus is EditText || CurrentFocus is TextView || CurrentFocus is SearchView)) { @@ -568,4 +568,4 @@ namespace Xamarin.Forms.Platform.Android #endregion } -} \ No newline at end of file +} -- cgit v1.2.3