1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-15 14:39:26 +01:00

Only dismiss the dialog is the activity is still alive

This commit is contained in:
cpfeiffer 2016-08-20 00:05:06 +02:00
parent 24d342565b
commit 02ac70e2a7

View File

@ -322,7 +322,9 @@ public class DebugActivity extends GBActivity {
@Override @Override
protected Object doInBackground(Object[] params) { protected Object doInBackground(Object[] params) {
helper.importOldDb(oldHandler, device, targetHandler); helper.importOldDb(oldHandler, device, targetHandler);
progress.dismiss(); if (!isFinishing() && !isDestroyed()) {
progress.dismiss();
}
return null; return null;
} }
}.execute((Object[]) null); }.execute((Object[]) null);