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() {
@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);
}
}
});
}