Skip to content
Permalink
Browse files
CB-12277: (android) avoid NullPointerException on splashImageView whe…
…n removing splashscreen
  • Loading branch information
russaa committed Jan 25, 2018
1 parent 9a6ff27 commit f9c88b8ab8280df920dc0de8e101a3abe599a353
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 f9c88b8

Please sign in to comment.