@@ -429,7 +429,7 @@ class OrderRepository extends AbstractRepository | |||
$lastOrder = $this->findOneOrderLastByUser($user); | |||
if ($lastOrder) { | |||
$pointSale = $this->pointSaleRepository->findOnePointSaleById($lastOrder->id_point_sale); | |||
if($distribution && !$this->pointSaleSolver->isDelivered($pointSale, $distribution)) { | |||
if($distribution && $pointSale && !$this->pointSaleSolver->isDelivered($pointSale, $distribution)) { | |||
$pointSale = null; | |||
} | |||
} |