fix a crash in ComposeActivity where a dialog was canceled that was already removed from the window

This commit is contained in:
Conny Duck 2017-11-07 15:01:20 +01:00
parent 26834b36ed
commit a2c361914b

View file

@ -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) {