diff --git a/tiny_gltf.h b/tiny_gltf.h index e2bd4a6..9405656 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -6074,6 +6074,7 @@ static void SerializeGltfAnimation(Animation &animation, json &o) { { json samplers; + JsonReserveArray(samplers, animation.samplers.size()); for (unsigned int i = 0; i < animation.samplers.size(); ++i) { json sampler; AnimationSampler gltfSampler = animation.samplers[i];