From 3b5d92eb8f296c809ba80b4264d502281af45ed7 Mon Sep 17 00:00:00 2001 From: Ben Morris Date: Fri, 22 Nov 2024 12:04:05 -0500 Subject: [PATCH] [cpp] avoid null pointer deference in PhysicsConstraintTimeline --- spine-cpp/spine-cpp/src/spine/PhysicsConstraintTimeline.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/spine-cpp/spine-cpp/src/spine/PhysicsConstraintTimeline.cpp b/spine-cpp/spine-cpp/src/spine/PhysicsConstraintTimeline.cpp index 2745e354db..952d9b0725 100644 --- a/spine-cpp/spine-cpp/src/spine/PhysicsConstraintTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/PhysicsConstraintTimeline.cpp @@ -95,6 +95,7 @@ void PhysicsConstraintResetTimeline::apply(Skeleton &skeleton, float lastTime, f else { Vector &physicsConstraints = skeleton.getPhysicsConstraints(); for (size_t i = 0; i < physicsConstraints.size(); i++) { + constraint = physicsConstraints[i]; if (constraint->_active) constraint->reset(); } }