Copying a null profile results in an empty profile.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Profile.java
index 242c96e..7662eda 100644 (file)
@@ -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;