diff --git a/src/main/java/com/impactupgrade/nucleus/service/segment/VirtuousCrmService.java b/src/main/java/com/impactupgrade/nucleus/service/segment/VirtuousCrmService.java index 64f80d1d2..d0abc38fb 100644 --- a/src/main/java/com/impactupgrade/nucleus/service/segment/VirtuousCrmService.java +++ b/src/main/java/com/impactupgrade/nucleus/service/segment/VirtuousCrmService.java @@ -269,15 +269,16 @@ private String getContactMethodValue(VirtuousClient.ContactIndividual contactInd } private CrmAddress getCrmAddress(VirtuousClient.Address address) { - if (address == null) { - return null; - } CrmAddress crmAddress = new CrmAddress(); - crmAddress.country = address.country; - crmAddress.state = address.state; - crmAddress.city = address.city; - crmAddress.postalCode = address.postal; - crmAddress.street = address.address1; + + if (address != null) { + crmAddress.country = address.country; + crmAddress.state = address.state; + crmAddress.city = address.city; + crmAddress.postalCode = address.postal; + crmAddress.street = address.address1; + } + return crmAddress; }