diff --git a/spine-csharp/src/AnimationState.cs b/spine-csharp/src/AnimationState.cs
index 684299638..8ba41b284 100644
--- a/spine-csharp/src/AnimationState.cs
+++ b/spine-csharp/src/AnimationState.cs
@@ -343,12 +343,13 @@ namespace Spine {
/// It may be desired to use to mix the skeletons back to the setup pose,
/// rather than leaving them in their previous pose.
public void ClearTracks () {
+ bool oldDrainDisabled = queue.drainDisabled;
queue.drainDisabled = true;
for (int i = 0, n = tracks.Count; i < n; i++) {
ClearTrack(i);
}
tracks.Clear();
- queue.drainDisabled = false;
+ queue.drainDisabled = oldDrainDisabled;
queue.Drain();
}
@@ -510,12 +511,13 @@ namespace Spine {
///
/// Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.
public void SetEmptyAnimations (float mixDuration) {
+ bool oldDrainDisabled = queue.drainDisabled;
queue.drainDisabled = true;
for (int i = 0, n = tracks.Count; i < n; i++) {
TrackEntry current = tracks.Items[i];
if (current != null) SetEmptyAnimation(i, mixDuration);
}
- queue.drainDisabled = false;
+ queue.drainDisabled = oldDrainDisabled;
queue.Drain();
}