make sure the dialog is still shown before dismissing

This commit is contained in:
ligi 2014-05-23 14:34:14 +02:00
parent 78283542be
commit 76df0c8721

View file

@ -60,8 +60,11 @@ public class UnzipPassDialog {
activity.runOnUiThread(new Runnable() { activity.runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
myProgress.dismiss(); if (myProgress.isShowing()) {
DisplayError(activity, activity.getString(R.string.invalid_passbook_title), reason); 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);
}
} }
}); });
} }