OnResume assumed that _application had been set #859

Merged
merged 1 commit into from Apr 6, 2017

Conversation

Projects
None yet
5 participants
@appbureauet

appbureauet commented Apr 6, 2017

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.

Description of Change

I have added a null check for the _application object before it's used.

Bugs Fixed

OnResume crashes if the _application has not been set.

API Changes

None

Behavioral Changes

Describe any non-bug related behavioral changes that may change how users app behaves when upgrading to this version of the codebase.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
OnResume assumed that _application had been set
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.
@dnfclas

This comment has been minimized.

Show comment
Hide comment
@dnfclas

dnfclas Apr 6, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

dnfclas commented Apr 6, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Apr 6, 2017

Member

Failing test is not from this pr

Member

rmarinho commented Apr 6, 2017

Failing test is not from this pr

@rmarinho rmarinho merged commit eb3db86 into xamarin:master Apr 6, 2017

2 of 3 checks passed

Android-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests faile…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: Windows Debug : Tests passed: 3755, ignored: 10
Details

rmarinho added a commit that referenced this pull request Apr 6, 2017

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.

@appbureauet appbureauet deleted the mellson:patch-1 branch Apr 6, 2017

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment