diff --git a/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/BaseFragment.kt b/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/BaseFragment.kt index 60df5cbec..dde695d0e 100644 --- a/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/BaseFragment.kt +++ b/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/BaseFragment.kt @@ -61,7 +61,7 @@ abstract class BaseFragment(val wantsPlayer: Boolean? = null) : Fragment() { if (hidden) return // see registerFragmentLifecycleCallbacks in MainActivity if (wantsPlayer != null) { - (requireActivity() as MainActivity).playerBottomSheet.visible = wantsPlayer + (activity as MainActivity?)?.playerBottomSheet?.visible = wantsPlayer } } } \ No newline at end of file