From 77b74fe98ac3880ad8491048f3a482feb3518ba6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 23 Mar 2011 20:57:51 +0100 Subject: [PATCH] Verify that the owner is not null before comparing it. --- src/main/java/net/pterodactylus/sone/data/Album.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.7.4