Nucache NullReferenceException when copying (#7961)
(cherry picked from commit b30db05cc7)
# Conflicts:
# src/Umbraco.Tests/PublishedContent/NuCacheChildrenTests.cs
This commit is contained in:
committed by
Sebastiaan Janssen
parent
055f18d639
commit
4a071f6e05
@@ -873,9 +873,11 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
var id = content.FirstChildContentId;
|
||||
while (id > 0)
|
||||
{
|
||||
// get the required link node, this ensures that both `link` and `link.Value` are not null
|
||||
var link = GetRequiredLinkedNode(id, "child", null);
|
||||
ClearBranchLocked(link.Value);
|
||||
id = link.Value.NextSiblingContentId;
|
||||
var linkValue = link.Value; // capture local since clearing in recurse can clear it
|
||||
ClearBranchLocked(linkValue); // recurse
|
||||
id = linkValue.NextSiblingContentId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user