Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only call state machine delegate function if delegate exists
This should fix an issue where under certain conditions, stateChanges access states whose name seems to be returning nil. The stateChanges property is otherwise unused outside of this function. By adding this guard, stateChanges will not be used if the state machine delegate is unset. This is a "quick fix" for an [issue](#330) in `rive-ios`. It seems that under certain conditions (tbd; still working with the developer to dig deeper). Somehow, the `.riv` animation seems to generate a state change whose name is `nil`, causing a crash in the `stateChanges` getter. This was initially attempted to be fixed by #7529. Diffs= 19bda7a59 Only call state machine delegate function if delegate exists (#7541) Co-authored-by: David Skuza <[email protected]>
- Loading branch information