fix(runtime): validate bindablePropertyInstance before using it (#12989) e2c7b48dc0 Co-authored-by: hernan <hernan@rive.app>
diff --git a/.rive_head b/.rive_head index a5b9b0c..e558e3a 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -a23e2ba586f435afcc8b7047a4d71069d508ebeb +e2c7b48dc0bf78809a3b1d40fa95b1f3bf7ec5c2
diff --git a/src/animation/blend_state_1d_instance.cpp b/src/animation/blend_state_1d_instance.cpp index bc8cc0b..2ecf1f3 100644 --- a/src/animation/blend_state_1d_instance.cpp +++ b/src/animation/blend_state_1d_instance.cpp
@@ -100,7 +100,8 @@ auto bindablePropertyInstance = stateMachineInstance->bindablePropertyInstance( blendState->bindableProperty()); - if (bindablePropertyInstance->is<BindablePropertyNumber>()) + if (bindablePropertyInstance && + bindablePropertyInstance->is<BindablePropertyNumber>()) { value = bindablePropertyInstance->as<BindablePropertyNumber>() ->propertyValue();
diff --git a/src/animation/blend_state_direct_instance.cpp b/src/animation/blend_state_direct_instance.cpp index 9146acb..bcbb2b6 100644 --- a/src/animation/blend_state_direct_instance.cpp +++ b/src/animation/blend_state_direct_instance.cpp
@@ -42,7 +42,8 @@ auto bindableInstance = stateMachineInstance->bindablePropertyInstance( bindableProperty); - if (bindableInstance->is<BindablePropertyNumber>()) + if (bindableInstance && + bindableInstance->is<BindablePropertyNumber>()) { auto bindableNumber = bindableInstance->as<BindablePropertyNumber>();