diff --git a/source/java/org/alfresco/repo/forum/CommentServiceImpl.java b/source/java/org/alfresco/repo/forum/CommentServiceImpl.java index b7ae4fd6cf..78a1a67ca9 100644 --- a/source/java/org/alfresco/repo/forum/CommentServiceImpl.java +++ b/source/java/org/alfresco/repo/forum/CommentServiceImpl.java @@ -63,7 +63,7 @@ public class CommentServiceImpl implements CommentService NodeRef result = null; for (ChildAssociationRef parentAssoc = nodeService.getPrimaryParent(descendantNodeRef); - parentAssoc != null; + parentAssoc != null && parentAssoc.getParentRef() != null; parentAssoc = nodeService.getPrimaryParent(parentAssoc.getParentRef())) { if (nodeService.hasAspect(parentAssoc.getParentRef(), ForumModel.ASPECT_DISCUSSABLE))