Skip to content

Commit c547d14

Browse files
committed
check(set-avatar): user id
Signed-off-by: alperozturk96 <[email protected]>
1 parent 1d93966 commit c547d14

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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)