From f46aa42ba69149d6d4f571e7731561fd8b075d9b Mon Sep 17 00:00:00 2001 From: bodymovin Date: Tue, 17 Sep 2024 21:42:16 +0000 Subject: [PATCH] Nnnn data context fixes 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 --- .rive_head | 2 +- src/file.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.rive_head b/.rive_head index a10e82ec..168de46b 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -7e8100fee512b17e902bc3f71c22aa6e78d8fae8 +5cdcc183f111082d6f422cee484536634a9eea3f diff --git a/src/file.cpp b/src/file.cpp index 66ad406a..9d513e46 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -274,7 +274,10 @@ ImportResult File::read(BinaryReader& reader, const RuntimeHeader& header) case ViewModelPropertyEnum::typeKey: { auto vme = object->as(); - vme->dataEnum(m_Enums[vme->enumId()]); + if (vme->enumId() < m_Enums.size()) + { + vme->dataEnum(m_Enums[vme->enumId()]); + } } break; }