Skip to content

Commit

Permalink
Nnnn data context fixes
Browse files Browse the repository at this point in the history
adds support for passing the data context of the parent if the child doesn't have its own data context.
Implements the enum data bind in cpp.
fixes an out of range index for missing enums.

Diffs=
5cdcc183f Nnnn data context fixes (#8148)

Co-authored-by: hernan <[email protected]>
  • Loading branch information
bodymovin and bodymovin committed Sep 17, 2024
1 parent 9c958d6 commit f46aa42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7e8100fee512b17e902bc3f71c22aa6e78d8fae8
5cdcc183f111082d6f422cee484536634a9eea3f
5 changes: 4 additions & 1 deletion src/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ ImportResult File::read(BinaryReader& reader, const RuntimeHeader& header)
case ViewModelPropertyEnum::typeKey:
{
auto vme = object->as<ViewModelPropertyEnum>();
vme->dataEnum(m_Enums[vme->enumId()]);
if (vme->enumId() < m_Enums.size())
{
vme->dataEnum(m_Enums[vme->enumId()]);
}
}
break;
}
Expand Down

0 comments on commit f46aa42

Please sign in to comment.