Fixed null pointer exception when getting avatar when NONE

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
This commit is contained in:
Andrew DeMaria
2017-04-08 10:01:40 -06:00
parent 51e9ef6ade
commit 8505d69dd5
@@ -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());
}