diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs index 676536253..1d8aaed52 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs @@ -119,7 +119,7 @@ namespace Orchard.Comments.Drivers { // prevent users from commenting on a closed thread by hijacking the commentedOn property var commentsPart = commentedOn.As(); - if (!commentsPart.CommentsActive) { + if (commentsPart == null || !commentsPart.CommentsActive) { _orchardServices.TransactionManager.Cancel(); return Editor(part, shapeHelper); }