diff --git a/clickedwordslib/src/main/java/com/github/hurshi/clickedwordslib/WordDetailDialog.java b/clickedwordslib/src/main/java/com/github/hurshi/clickedwordslib/WordDetailDialog.java index b19d480..9a26375 100644 --- a/clickedwordslib/src/main/java/com/github/hurshi/clickedwordslib/WordDetailDialog.java +++ b/clickedwordslib/src/main/java/com/github/hurshi/clickedwordslib/WordDetailDialog.java @@ -58,9 +58,11 @@ public void onDismiss(DialogInterface dialogInterface) { // ft.hide(WordDetailDialog.this); // ft.commitAllowingStateLoss(); // dismiss(); - onDialogDismiss(); - if (null != listener) { - listener.onDismiss(); + if (null != getActivity() && !getActivity().isFinishing()) { + onDialogDismiss(); + if (null != listener) { + listener.onDismiss(); + } } } });