Fixed null pointer exception when getting avatar when NONE

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 8 years ago
parent 51e9ef6ade
commit 8505d69dd5
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 3
      libresonic-main/src/main/java/org/libresonic/player/controller/AvatarController.java

@ -90,6 +90,9 @@ public class AvatarController implements LastModified {
if (userSettings.getAvatarScheme() == AvatarScheme.CUSTOM || forceCustom) {
return settingsService.getCustomAvatar(username);
}
if(userSettings.getAvatarScheme() == AvatarScheme.NONE) {
return null;
}
return settingsService.getSystemAvatar(userSettings.getSystemAvatarId());
}

Loading…
Cancel
Save