From 0924c48fab010b6b2f12af80fea6dbd0961754e8 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 24 Mar 2023 16:11:56 +0100 Subject: [PATCH] Fix crash when bottom sheet is being dismissed --- .../java/com/github/libretube/ui/sheets/BaseBottomSheet.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/sheets/BaseBottomSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/BaseBottomSheet.kt index 140adc68d..7531f3854 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/BaseBottomSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/BaseBottomSheet.kt @@ -38,7 +38,9 @@ open class BaseBottomSheet : ExpandedBottomSheet() { lifecycleScope.launch { dialog?.hide() listener?.invoke(index) - dismiss() + runCatching { + dismiss() + } } } }