Skip to content

Commit f1c5940

Browse files
bodymovinbodymovin
andcommitted
fix(runtime): validate bindablePropertyInstance before using it (#12989) e2c7b48dc0
Co-authored-by: hernan <hernan@rive.app>
1 parent 55a11fa commit f1c5940

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.rive_head

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a23e2ba586f435afcc8b7047a4d71069d508ebeb
1+
e2c7b48dc0bf78809a3b1d40fa95b1f3bf7ec5c2

src/animation/blend_state_1d_instance.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ void BlendState1DInstance::advance(float seconds,
100100
auto bindablePropertyInstance =
101101
stateMachineInstance->bindablePropertyInstance(
102102
blendState->bindableProperty());
103-
if (bindablePropertyInstance->is<BindablePropertyNumber>())
103+
if (bindablePropertyInstance &&
104+
bindablePropertyInstance->is<BindablePropertyNumber>())
104105
{
105106
value = bindablePropertyInstance->as<BindablePropertyNumber>()
106107
->propertyValue();

src/animation/blend_state_direct_instance.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ void BlendStateDirectInstance::advance(
4242
auto bindableInstance =
4343
stateMachineInstance->bindablePropertyInstance(
4444
bindableProperty);
45-
if (bindableInstance->is<BindablePropertyNumber>())
45+
if (bindableInstance &&
46+
bindableInstance->is<BindablePropertyNumber>())
4647
{
4748
auto bindableNumber =
4849
bindableInstance->as<BindablePropertyNumber>();

0 commit comments

Comments
 (0)