Skip to content

Commit

Permalink
apply missing animation fix to macos and android
Browse files Browse the repository at this point in the history
couple more fun patches to cope when animation state objects do not have an animation.

Diffs=
272ca3f02 apply missing animation fix to macos and android (#4847)
  • Loading branch information
mjtalbot committed Feb 22, 2023
1 parent 9f56f34 commit 07f48de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12285f625ff69c6b21528d93b3b665d9b0b9f8be
272ca3f02fb6900c86868ba2025433ef2c905bf5
8 changes: 5 additions & 3 deletions Source/Renderer/LayerState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ - (NSString*)name
{
auto inst = [self rive_layer_state];
auto animation = ((const rive::AnimationState*)inst)->animation();

if (animation == nil){

if (animation == nil)
{
return [NSString stringWithCString:"Unknown" encoding:[NSString defaultCStringEncoding]];
}
return [NSString stringWithCString:animation->name().c_str() encoding:[NSString defaultCStringEncoding]];
return [NSString stringWithCString:animation->name().c_str()
encoding:[NSString defaultCStringEncoding]];
}
@end

Expand Down

0 comments on commit 07f48de

Please sign in to comment.