From a2c361914b3b2f9fef7354e15a2979b5841f2509 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Tue, 7 Nov 2017 15:01:20 +0100 Subject: [PATCH] fix a crash in ComposeActivity where a dialog was canceled that was already removed from the window --- app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index bbf015424..9e62c3010 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -1407,7 +1407,7 @@ public final class ComposeActivity extends BaseActivity implements ComposeOption * it from the queue, then don't display this error message. */ displayTransientError(R.string.error_media_upload_sending); } - if (finishingUploadDialog != null) { + if (finishingUploadDialog != null && finishingUploadDialog.isShowing()) { finishingUploadDialog.cancel(); } if (!isCanceled) {