]> git.mxchange.org Git - juser-core.git/commitdiff
If the administrator updates only user data, contact is null
authorRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 12:41:40 +0000 (14:41 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 12:41:40 +0000 (14:41 +0200)
src/org/mxchange/jusercore/model/user/LoginUser.java

index 3f6d154f192824920bb17ad7395f09bcbc02dfd0..b5d76fe3ac72f0f71477f06d195952fb11abadf5 100644 (file)
@@ -172,8 +172,11 @@ public class LoginUser implements User {
 
        @Override
        public void copyAll (final User user) {
-               // Copy also contact data
-               this.getUserContact().copyAll(user.getUserContact());
+               // Is contact set?
+               if (user.getUserContact() instanceof Contact) {
+                       // Copy also contact data
+                       this.getUserContact().copyAll(user.getUserContact());
+               }
 
                // Copy other data
                this.setUserConfirmKey(user.getUserConfirmKey());