Skip to content

Commit a2ed136

Browse files
committed
Customer model - getPrimaryAddresses without primary billing address - Fix for issue #1096
1 parent d0131d7 commit a2ed136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Customer/Model/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ public function getPrimaryAddresses()
719719

720720
$primaryShipping = $this->getPrimaryShippingAddress();
721721
if ($primaryShipping) {
722-
if ($primaryBilling->getId() == $primaryShipping->getId()) {
722+
if ($primaryBilling && $primaryBilling->getId() == $primaryShipping->getId()) {
723723
$primaryBilling->setIsPrimaryShipping(true);
724724
} else {
725725
$primaryShipping->setIsPrimaryShipping(true);

0 commit comments

Comments
 (0)