소스 검색

Closing the app might lead to a crash due to an IllegalArgumentException

Xavier Sellier 7 년 전
부모
커밋
b6a2d5f508
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java

+ 7 - 1
platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java

@@ -193,7 +193,13 @@ public class PaymentsManager {
 
 	public void destroy() {
 		if (mService != null) {
-			activity.unbindService(mServiceConn);
+			try {
+				activity.unbindService(mServiceConn);
+			} catch (IllegalArgumentException e) {
+				// Somehow we've already been unbound. This is a non-fatal
+				// error.
+				Log.e(TAG, "Unable to unbind from payment service (already unbound)");
+			}
 		}
 
 		mSetupDone = false;