mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 05:05:31 +03:00
FileDetailFragment: prevent NullPointerException if fileDetailSharingFragment is called too soon
Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
53999c809c
commit
b7d51e573a
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue