about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-23 21:42:14 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:15 -0500
commit48e527317f00563c430c73b72304ba74deb5622b (patch)
tree7737ebe6f0b2e65f88679336434fcfcfe33eea18 /app/workers
parentd94b3b86a946944bb3d99f05f4ddb22300a5e232 (diff)
[Bug] Use safe navigation to prevent crash if reply is orphaned
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/activitypub/distribution_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/activitypub/distribution_worker.rb b/app/workers/activitypub/distribution_worker.rb
index ec1b1f20e..2ee86d496 100644
--- a/app/workers/activitypub/distribution_worker.rb
+++ b/app/workers/activitypub/distribution_worker.rb
@@ -35,7 +35,7 @@ class ActivityPub::DistributionWorker
     # Deliver the status to all followers.
     # If the status is a reply to another local status, also forward it to that
     # status' authors' followers.
-    @inboxes ||= if @status.reply? && @status.thread.account.local? && @status.distributable?
+    @inboxes ||= if @status.reply? && @status.thread&.account&.local? && @status.distributable?
                    @account.followers.or(@status.thread.account.followers).inboxes
                  else
                    @account.followers.inboxes