From cb5e5d7036ad35804ea558aa3b9f38ac04cc1945 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Apr 2016 14:41:40 +0200 Subject: [PATCH] If the administrator updates only user data, contact is null --- src/org/mxchange/jusercore/model/user/LoginUser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 3f6d154..b5d76fe 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -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()); -- 2.39.5