Skip to content

Commit e27f128

Browse files
Merge pull request #16375 from nextcloud/check/user-id-set-avatar
check(set-avatar): user id
2 parents b16bcfd + c547d14 commit e27f128

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/src/main/java/com/owncloud/android/utils/DisplayUtils.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ public static void setAvatar(@NonNull User user, AvatarGenerationListener listen
434434
String userId = accountManager.getUserData(user.toPlatformAccount(),
435435
com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID);
436436

437+
if (userId == null) {
438+
Log_OC.e(TAG, "user id is null, cannot set avatar");
439+
return;
440+
}
441+
437442
setAvatar(user, userId, listener, avatarRadius, resources, callContext, context);
438443
}
439444

0 commit comments

Comments
 (0)