Skip to content

Commit 2e154cc

Browse files
committed
Merge pull request kivy#412 from Mystic-Mirage/fix-presplash-exit-crash
Fix crash on presplash screen if back button pressed
2 parents 31a6b34 + 4181e91 commit 2e154cc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/src/org/renpy/android/PythonActivity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,13 @@ public boolean onKeyUp(int keyCode, final KeyEvent event) {
333333
}
334334

335335
protected void onDestroy() {
336-
mPurchaseDatabase.close();
337-
mBillingService.unbind();
336+
if (mPurchaseDatabase != null) {
337+
mPurchaseDatabase.close();
338+
}
339+
340+
if (mBillingService != null) {
341+
mBillingService.unbind();
342+
}
338343

339344
if (mView != null) {
340345
mView.onDestroy();

0 commit comments

Comments
 (0)