- // Get Users and Groups
- mShares = ((ShareActivity) mListener).getStorageManager().getSharesWithForAFile(mFile.getRemotePath(),
- mAccount.name);
-
- // Update list of users/groups
- updateListOfUserGroups();
+ if (((FileActivity) mListener).getStorageManager() != null) {
+ // Get Users and Groups
+ mShares = ((FileActivity) mListener).getStorageManager().getSharesWithForAFile(
+ mFile.getRemotePath(),
+ mAccount.name
+ );
+
+ // Update list of users/groups
+ updateListOfUserGroups();
+ }