You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: AsyncDisplayKit/ASControlNode.m
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,6 @@ - (id)init
76
76
if (!(self = [superinit]))
77
77
returnnil;
78
78
79
-
_controlEventDispatchTable = [[NSMutableDictionaryalloc] initWithCapacity:kASControlNodeEventDispatchTableInitialCapacity]; // enough to handle common types without re-hashing the dictionary when adding entries.
80
79
_enabled = YES;
81
80
82
81
// As we have no targets yet, we start off with user interaction off. When a target is added, it'll get turned back on.
// Convert nil to [NSNull null] so that it can be used as a key for NSMapTable.
215
214
if (!target)
216
215
target = [NSNullnull];
216
+
217
+
if (!_controlEventDispatchTable) {
218
+
_controlEventDispatchTable = [[NSMutableDictionaryalloc] initWithCapacity:kASControlNodeEventDispatchTableInitialCapacity]; // enough to handle common types without re-hashing the dictionary when adding entries.
219
+
}
217
220
218
221
// Enumerate the events in the mask, adding the target-action pair for each control event included in controlEventMask
ASDisplayNodeAssert(rasterizing || !(_hierarchyState & ASHierarchyStateRasterized), @"Rasterized descendants should never display unless being drawn into the rasterized container.");
0 commit comments