Check correct Sone for avatar image
[Sone.git] / src / main / java / net / pterodactylus / sone / template / ProfileAccessor.java
index ce29caa..eb280e1 100644 (file)
@@ -65,7 +65,7 @@ public class ProfileAccessor extends ReflectionAccessor {
                        if (avatarId == null) {
                                return null;
                        }
-                       if (!currentSone.getImageByInternalId(avatarId).isPresent()) {
+                       if (!profile.getSone().getImageByInternalId(avatarId).isPresent()) {
                                /* avatar ID but no matching image? show nothing. */
                                return null;
                        }