We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8594c79 + 9a97ddf commit 4f3e10cCopy full SHA for 4f3e10c
cocos2d/CCActionManager.m
@@ -81,13 +81,13 @@ -(void) deleteHashElement:(tHashElement*)element
81
82
-(void) actionAllocWithHashElement:(tHashElement*)element
83
{
84
- NSMutableArray* aObj = [[NSMutableArray alloc] init];
85
- void* a = (__bridge void*) aObj;
86
- CFRetain(a);
87
-
88
- // 4 actions per Node by default
89
- if( element->actions == nil )
+ // if actions array doesn't exist yet, create one
+ if( element->actions == nil ) {
+ NSMutableArray* aObj = [[NSMutableArray alloc] init];
+ void* a = (__bridge void*) aObj;
+ CFRetain(a);
90
element->actions = aObj;
+ }
91
}
92
93
-(void) removeActionAtIndex:(NSUInteger)index hashElement:(tHashElement*)element
0 commit comments