Handle topics without categories

Handle topics without categories

diff --git a/lib/topic_view.rb b/lib/topic_view.rb
index 0568e07..14db181 100644
--- a/lib/topic_view.rb
+++ b/lib/topic_view.rb
@@ -431,7 +431,7 @@ class TopicView
 
   def category_group_moderator_user_ids
     @category_group_moderator_user_ids ||= begin
-      if SiteSetting.enable_category_group_moderation? && @topic.category.reviewable_by_group.present?
+      if SiteSetting.enable_category_group_moderation? && @topic.category&.reviewable_by_group&.present?
         posts_user_ids = Set.new(@posts.map(&:user_id))
         Set.new(
           @topic.category.reviewable_by_group.group_users.where(user_id: posts_user_ids).pluck('distinct user_id')

GitHub sha: 17ab6992