NathanSweet пре 12 година
родитељ
комит
748431b4f6

+ 1 - 0
spine-c/src/spine/Animation.c

@@ -515,6 +515,7 @@ void AttachmentTimeline_setFrame (AttachmentTimeline* self, int frameIndex, floa
 
 void _EventTimeline_apply (const Timeline* timeline, Skeleton* skeleton, float lastTime, float time, Event** firedEvents,
 		int* eventCount, float alpha) {
+	if (!firedEvents) return;
 	EventTimeline* self = (EventTimeline*)timeline;
 	int frameIndex;
 

+ 1 - 0
spine-csharp/src/Animation.cs

@@ -460,6 +460,7 @@ namespace Spine {
 		}
 
 		public void Apply (Skeleton skeleton, float lastTime, float time, List<Event> firedEvents, float alpha) {
+			if (firedEvents == null) return;
 			float[] frames = this.frames;
 			int frameCount = frames.Length;
 

+ 1 - 0
spine-libgdx/src/com/esotericsoftware/spine/Animation.java

@@ -534,6 +534,7 @@ public class Animation {
 		}
 
 		public void apply (Skeleton skeleton, float lastTime, float time, Array<Event> firedEvents, float alpha) {
+			if (firedEvents == null) return;
 			float[] frames = this.frames;
 			int frameCount = frames.length;