From 748431b4f63cb4c0c6dc8e973aa717bbe7e59b0e Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Thu, 3 Oct 2013 21:32:57 +0200 Subject: [PATCH] Allow null firedEvents. --- spine-c/src/spine/Animation.c | 1 + spine-csharp/src/Animation.cs | 1 + spine-libgdx/src/com/esotericsoftware/spine/Animation.java | 1 + 3 files changed, 3 insertions(+) diff --git a/spine-c/src/spine/Animation.c b/spine-c/src/spine/Animation.c index b55f2a86a..9aea153bc 100644 --- a/spine-c/src/spine/Animation.c +++ b/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; diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index d08703b98..981295516 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -460,6 +460,7 @@ namespace Spine { } public void Apply (Skeleton skeleton, float lastTime, float time, List firedEvents, float alpha) { + if (firedEvents == null) return; float[] frames = this.frames; int frameCount = frames.Length; diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index e89a89e43..7f900a0c7 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/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 firedEvents, float alpha) { + if (firedEvents == null) return; float[] frames = this.frames; int frameCount = frames.length;