diff --git a/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java b/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java index f93aebed06..08f14bf7e3 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -169,6 +169,9 @@ public class FileDetailFragment extends FileFragment implements OnClickListener, * @return reference to the {@link FileDetailSharingFragment} */ public FileDetailSharingFragment getFileDetailSharingFragment() { + if (binding == null) { + return null; + } return ((FileDetailTabAdapter) binding.pager.getAdapter()).getFileDetailSharingFragment(); }