Skip to content

Commit 0997c66

Browse files
Senol122HayesGordon
authored andcommitted
Fix: touching the rive can cause a crash on iOS
1 parent b04e054 commit 0997c66

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ios/RiveReactNativeView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ class RiveReactNativeView: RCTView, RivePlayerDelegate, RiveStateMachineDelegate
603603
if let viewModel = viewModel, let riveView = viewModel.riveView {
604604
let artboardLocation = riveView.artboardLocation(
605605
fromTouchLocation: location,
606-
inArtboard: viewModel.riveModel!.artboard!.bounds(),
606+
inArtboard: viewModel.riveModel?.artboard?.bounds() ?? CGRect.zero,
607607
fit: viewModel.fit,
608608
alignment: viewModel.alignment
609609
)

0 commit comments

Comments
 (0)