Skip to content

Commit

Permalink
Avoid null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
KorvinSzanto authored Oct 29, 2024
1 parent 96e65dd commit ae3bed9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function view(): RedirectResponse
$repository = $this->app->make(PackageRepositoryInterface::class);
$coordinator = $this->app->make(PurchaseConnectionCoordinator::class);
$connection = $repository->getConnection();
if ($repository->validate($connection)) {
if ($connection !== null && $repository->validate($connection)) {
// Redirect the url to the marketplace with a verified connection
$url = $coordinator->createPurchaseConnectionUrl(
$connection,
Expand Down

0 comments on commit ae3bed9

Please sign in to comment.