add missing validations fixes #7531 there were two validations that were missing in the c++ runtime but were not in Flutter Diffs= 1e7b1c030 add missing validations (#7532) Co-authored-by: hernan <hernan@rive.app>
diff --git a/.rive_head b/.rive_head index 2cc5458..21b7f3d 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -07cbce5511e451396513f9d092a72193d41844f5 +1e7b1c0301a9fb9404798d5b4c0e7175d199659e
diff --git a/src/animation/animation_reset_factory.cpp b/src/animation/animation_reset_factory.cpp index a08f35f..55ca964 100644 --- a/src/animation/animation_reset_factory.cpp +++ b/src/animation/animation_reset_factory.cpp
@@ -35,8 +35,14 @@ auto pos = keyedPropertiesSet.find(keyedProperty->propertyKey()); if (pos == keyedPropertiesSet.end()) { - keyedPropertiesSet.insert(keyedProperty->propertyKey()); - keyedPropertiesData.push_back(KeyedPropertyData(keyedProperty, isBaseline)); + switch (CoreRegistry::propertyFieldId(keyedProperty->propertyKey())) + { + case CoreDoubleType::id: + case CoreColorType::id: + keyedPropertiesSet.insert(keyedProperty->propertyKey()); + keyedPropertiesData.push_back(KeyedPropertyData(keyedProperty, isBaseline)); + break; + } } index++; } @@ -66,7 +72,6 @@ void findKeyedObjects(const LinearAnimation* animation, bool isFirstAnimation) { - size_t index = 0; while (index < animation->numKeyedObjects()) { @@ -169,7 +174,7 @@ if (stateInstance != nullptr) { auto state = stateInstance->state(); - if (state->is<AnimationState>()) + if (state->is<AnimationState>() && state->as<AnimationState>()->animation() != nullptr) { animations.push_back(state->as<AnimationState>()->animation()); }