Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Fix issue that app crashs when exit with back key.
Browse files Browse the repository at this point in the history
Adjust the onDestory() invoking in CordovaActivity.java to avoid
the null object reference.

BUG=https://crosswalk-project.org/jira/browse/XWALK-2493
  • Loading branch information
gaochun authored and fujunwei committed Oct 14, 2014
1 parent 7ada193 commit af2ab8b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions framework/src/org/apache/cordova/CordovaActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,6 @@ protected void onResume() {
@Override
public void onDestroy() {
LOG.d(TAG, "CordovaActivity.onDestroy()");
super.onDestroy();
if (this.appView != null)
this.appView.onDestroy();

// hide the splash screen to avoid leaking a window
this.removeSplashScreen();
Expand All @@ -675,6 +672,8 @@ public void onDestroy() {
else {
this.activityState = ACTIVITY_EXITING;
}

super.onDestroy();
}

/**
Expand Down

0 comments on commit af2ab8b

Please sign in to comment.