mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Merge pull request #5837 from mjy78/issue/5836
#5836 Fix null ref exception in CommentPartDriver
This commit is contained in:
@@ -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<CommentsPart>();
|
||||
if (!commentsPart.CommentsActive) {
|
||||
if (commentsPart == null || !commentsPart.CommentsActive) {
|
||||
_orchardServices.TransactionManager.Cancel();
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
|
Reference in New Issue
Block a user