Skip to content

Commit 4181e91

Browse files
committed
Fix crash on presplash screen if back button pressed
1 parent 52e1861 commit 4181e91

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)