Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 0a9d9c7

Browse files
committed
Avoid recreate dialog
When permission change by setting, this dialog recreate and occur crash
1 parent 9c0783c commit 0a9d9c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tedbottompicker/src/main/java/gun0912/tedbottompicker/TedBottomSheetDialogFragment.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ public void setupDialog(Dialog dialog, int style) {
139139

140140
}
141141

142+
if (builder == null) {
143+
dismissAllowingStateLoss();
144+
return;
145+
}
142146
initView(contentView);
143147

144148
setTitle();

0 commit comments

Comments
 (0)