fix: add nullptr check when retrieving text run on iOS at the artboard

Issue: https://github.com/rive-app/rive-ios/issues/286

Doing a small check on the artboard query for a text run for `nullptr` before returning from the Artboard

Diffs=
35daf194f fix: add nullptr check when retrieving text run on iOS at the artboard (#6312)

Co-authored-by: Zachary Plata <plata.zach@gmail.com>
This commit is contained in:
zplata
2023-12-06 14:38:49 +00:00
parent 27de5abf4b
commit a85c61b298
5 changed files with 21 additions and 4 deletions

View File

@@ -24,7 +24,11 @@ struct TextInputView: DismissableView {
.padding()
.onChange(of: userInput, perform: { newValue in
if (!newValue.isEmpty) {
try! rvm.setTextRunValue("MyRun", textValue: userInput)
do {
try rvm.setTextRunValue("MyRun", textValue: userInput)
} catch {
debugPrint(error)
}
}
})
rvm.view()