From: David ‘Bombe’ Roden Date: Sat, 16 Oct 2010 09:48:43 +0000 (+0200) Subject: Copying a null profile results in an empty profile. X-Git-Tag: 0.1-RC1~279 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=6306081e81de727dbf51cda343677358ce85e0c6 Copying a null profile results in an empty profile. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Profile.java b/src/main/java/net/pterodactylus/sone/data/Profile.java index 242c96e..7662eda 100644 --- a/src/main/java/net/pterodactylus/sone/data/Profile.java +++ b/src/main/java/net/pterodactylus/sone/data/Profile.java @@ -51,6 +51,9 @@ public class Profile { * The profile to copy */ public Profile(Profile profile) { + if (profile == null) { + return; + } this.firstName = profile.firstName; this.middleName = profile.middleName; this.lastName = profile.lastName;