Verify that the owner is not null before comparing it.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 23 Mar 2011 19:57:51 +0000 (20:57 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 23 Mar 2011 19:57:51 +0000 (20:57 +0100)
src/main/java/net/pterodactylus/sone/data/Album.java

index 16c9916..d808e7c 100644 (file)
@@ -157,7 +157,7 @@ public class Album implements Fingerprintable {
         *            The image to add
         */
        public void addImage(Image image) {
-               Validation.begin().isNotNull("Image", image).check().isEqual("Image Owner", image.getSone(), sone).check();
+               Validation.begin().isNotNull("Image", image).check().isNotNull("Image Owner", image.getSone()).check().isEqual("Image Owner", image.getSone(), sone).check();
                images.add(image);
        }