From: David ‘Bombe’ Roden Date: Wed, 23 Mar 2011 19:57:51 +0000 (+0100) Subject: Verify that the owner is not null before comparing it. X-Git-Tag: beta-freefall-0.6.2-1~77 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=77b74fe98ac3880ad8491048f3a482feb3518ba6;p=Sone.git Verify that the owner is not null before comparing it. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Album.java b/src/main/java/net/pterodactylus/sone/data/Album.java index 16c9916..d808e7c 100644 --- a/src/main/java/net/pterodactylus/sone/data/Album.java +++ b/src/main/java/net/pterodactylus/sone/data/Album.java @@ -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); }