From f647c308a2d67b265f89f0821033168782c34405 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 22 Nov 2022 09:41:10 +0100 Subject: [PATCH] Fix a crash if app is killed --- .../java/app/fedilab/android/activities/CacheActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/activities/CacheActivity.java b/app/src/main/java/app/fedilab/android/activities/CacheActivity.java index 124c78009..19cc67d45 100644 --- a/app/src/main/java/app/fedilab/android/activities/CacheActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/CacheActivity.java @@ -143,7 +143,11 @@ public class CacheActivity extends BaseActivity { dialogRestart.dismiss(); Helper.restart(CacheActivity.this); }); - restartBuilder.create().show(); + AlertDialog alertDialog = restartBuilder.create(); + if (!isFinishing()) { + alertDialog.show(); + } + })); dialog.dismiss(); });