diff --git a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java index 948a8274c..6b9e38b98 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java @@ -113,7 +113,7 @@ public enum StreamDialogDefaultEntry { DOWNLOAD(R.string.download, (fragment, item) -> fetchStreamInfoAndSaveToDatabase(fragment.requireContext(), item.getServiceId(), item.getUrl(), info -> { - if (fragment.getContext() != null) { + if (fragment.isAdded() && !fragment.isStateSaved()) { final DownloadDialog downloadDialog = new DownloadDialog(fragment.requireContext(), info); downloadDialog.show(fragment.getChildFragmentManager(),