File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -939,8 +939,11 @@ - (void) readPropertyForNode:(CCNode*) node parent:(CCNode*)parent isExtraProp:(
939939 {
940940 CCEffect * effect = [self readEffects ];
941941
942+ if (effect)
943+ {
942944 // Hmmm..... Force it to write to @"effect" property.
943945 [node setValue: effect forKey: @" effect" ];
946+ }
944947
945948 }
946949 else
@@ -957,6 +960,11 @@ -(CCEffect*)readEffects
957960
958961 int numberOfEffects = readIntWithSign (self, NO );
959962
963+ if (numberOfEffects == 0 )
964+ {
965+ return nil ;
966+ }
967+
960968 NSMutableArray * effectsStack = [NSMutableArray array ];
961969
962970 for (int i = 0 ; i < numberOfEffects; i++) {
@@ -988,7 +996,7 @@ -(CCEffect*)readEffects
988996
989997 }
990998
991- return [[CCEffectStack alloc ] initWithEffects : effectsStack];
999+ return [[CCEffectStack alloc ] initWithArray : effectsStack];
9921000
9931001}
9941002
You can’t perform that action at this time.
0 commit comments