diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 6c3c941b5f67..f331e3597da2 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -90,7 +90,7 @@ class NinjaMailerJob implements ShouldQueue $this->company = Company::where('company_key', $this->nmo->company->company_key)->first(); /* If any pre conditions fail, we return early here */ - if($this->preFlightChecksFail()) + if(!$this->company || $this->preFlightChecksFail()) return; /* Set the email driver */