lihao 4 年之前
父节点
当前提交
58422dd826
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      gx_api/GxPress/Service/GxPress.Service.Implement/Reply/ReplyService.Comment.cs

+ 6 - 3
gx_api/GxPress/Service/GxPress.Service.Implement/Reply/ReplyService.Comment.cs

@@ -147,9 +147,12 @@ namespace GxPress.Service.Implement.Reply
                 if (item.Pid > 0)
                 {
                     ReplyResult replyResult1 = my.FirstOrDefault(n => n.Id == item.Pid);
-                    ReplyResult replyResult = replyResult1;
-                    item.Title = replyResult.CommentContent;
-                    item.Name = replyResult.Name;
+                    if (replyResult1 != null)
+                    {
+                        ReplyResult replyResult = replyResult1;
+                        item.Title = replyResult.CommentContent;
+                        item.Name = replyResult.Name;
+                    }
                 }
                 item.AvatarUrl = StringUtils.AddDomainMin(item.AvatarUrl);
                 item.Remark = ((AllTypeConst)item.TypeValue).GetDescriptionOriginal();