From a01276699aa0e6218710d33a7cd8bda5f0bdd97b Mon Sep 17 00:00:00 2001 From: Mohamed Zenadi Date: Tue, 12 May 2015 22:59:27 +0200 Subject: fixes some crashes where the dialog is no longer available --- app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java index 1551012f..184186af 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java @@ -52,7 +52,12 @@ public class GitAsyncTask extends AsyncTask { protected void onPostExecute(String result) { if (this.dialog != null) - this.dialog.dismiss(); + try { + this.dialog.dismiss(); + } catch (Exception e) + { + // ignore + } if (result == null) result = "Unexpected error"; -- cgit v1.2.3