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:(
939
939
{
940
940
CCEffect * effect = [self readEffects ];
941
941
942
+ if (effect)
943
+ {
942
944
// Hmmm..... Force it to write to @"effect" property.
943
945
[node setValue: effect forKey: @" effect" ];
946
+ }
944
947
945
948
}
946
949
else
@@ -957,6 +960,11 @@ -(CCEffect*)readEffects
957
960
958
961
int numberOfEffects = readIntWithSign (self, NO );
959
962
963
+ if (numberOfEffects == 0 )
964
+ {
965
+ return nil ;
966
+ }
967
+
960
968
NSMutableArray * effectsStack = [NSMutableArray array ];
961
969
962
970
for (int i = 0 ; i < numberOfEffects; i++) {
@@ -988,7 +996,7 @@ -(CCEffect*)readEffects
988
996
989
997
}
990
998
991
- return [[CCEffectStack alloc ] initWithEffects : effectsStack];
999
+ return [[CCEffectStack alloc ] initWithArray : effectsStack];
992
1000
993
1001
}
994
1002
You can’t perform that action at this time.
0 commit comments