Skip to content
Permalink
Browse files
Merge pull request #149 from mmig/CB-12277
CB-12277: (android) avoid NullPointerException  when removing splash-screen
  • Loading branch information
jcesarmobile committed Jul 30, 2018
2 parents d96c08e + c95a26a commit 91a82108909ee0f588fdd5743b0ecc5332ad64f2
Showing 1 changed file with 2 additions and 2 deletions.
@@ -219,7 +219,7 @@ public void onConfigurationChanged(Configuration newConfig) {
private void removeSplashScreen(final boolean forceHideImmediately) {
cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
if (splashDialog != null && splashDialog.isShowing()) {
if (splashDialog != null && splashImageView != null && splashDialog.isShowing()) {//check for non-null splashImageView, see https://issues.apache.org/jira/browse/CB-12277
final int fadeSplashScreenDuration = getFadeDuration();
// CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately
if (fadeSplashScreenDuration > 0 && forceHideImmediately == false) {
@@ -238,7 +238,7 @@ public void onAnimationStart(Animation animation) {

@Override
public void onAnimationEnd(Animation animation) {
if (splashDialog != null && splashDialog.isShowing()) {
if (splashDialog != null && splashImageView != null && splashDialog.isShowing()) {//check for non-null splashImageView, see https://issues.apache.org/jira/browse/CB-12277
splashDialog.dismiss();
splashDialog = null;
splashImageView = null;

0 comments on commit 91a8210

Please sign in to comment.