From 65e17e006c23908ef3aa00d972e3ef02f5f97528 Mon Sep 17 00:00:00 2001 From: wiseoldduck Date: Thu, 6 Dec 2018 07:18:34 +0000 Subject: [PATCH] Do not lock the nodeController if we are not locking to root. Doing so leaves it locked when we elsewhere explicitly unlock the node to ascend. --- Source/ASDisplayNode+Layout.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/ASDisplayNode+Layout.mm b/Source/ASDisplayNode+Layout.mm index 9fbecf39f..d17136efe 100644 --- a/Source/ASDisplayNode+Layout.mm +++ b/Source/ASDisplayNode+Layout.mm @@ -1055,13 +1055,13 @@ - (ASLockSet)lockToRootIfNeededForLayout { if (!addLock(self)) { return NO; } - if (self.nodeController && !addLock(self.nodeController)) { - return NO; - } #if YOGA if (![self locked_shouldLayoutFromYogaRoot]) { return YES; } + if (self.nodeController && !addLock(self.nodeController)) { + return NO; + } ASDisplayNode *parent = _supernode; while (parent) { if (!addLock(parent)) {