diff --git a/lib/guardian/post_guardian.rb b/lib/guardian/post_guardian.rb index ba26c096481..156e19f7e7d 100644 --- a/lib/guardian/post_guardian.rb +++ b/lib/guardian/post_guardian.rb @@ -130,7 +130,7 @@ module PostGuardian SiteSetting.trusted_users_can_edit_others? && @user.has_trust_level?(TrustLevel[4]) ) || - is_category_group_moderator?(post.topic.category) + is_category_group_moderator?(post.topic&.category) ) if post.topic&.archived? || post.user_deleted || post.deleted_at