diff --git a/src/main/java/org/ligi/passandroid/ui/UnzipPassDialog.java b/src/main/java/org/ligi/passandroid/ui/UnzipPassDialog.java index 10942713..0dbefb84 100644 --- a/src/main/java/org/ligi/passandroid/ui/UnzipPassDialog.java +++ b/src/main/java/org/ligi/passandroid/ui/UnzipPassDialog.java @@ -60,8 +60,11 @@ public class UnzipPassDialog { activity.runOnUiThread(new Runnable() { @Override public void run() { - myProgress.dismiss(); - DisplayError(activity, activity.getString(R.string.invalid_passbook_title), reason); + if (myProgress.isShowing()) { + myProgress.dismiss(); + // TODO - check if it would be good to inform the user in another way + DisplayError(activity, activity.getString(R.string.invalid_passbook_title), reason); + } } }); }