mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
lottie/expressions: ++exceptional handling
Stop handling if the interpreting result is invalid.
This commit is contained in:
parent
9cff11f25e
commit
7f1fbdcaa4
1 changed files with 1 additions and 1 deletions
|
@ -1219,7 +1219,7 @@ jerry_value_t LottieExpressions::evaluate(float frameNo, LottieExpression* exp)
|
|||
//evaluate the code
|
||||
auto eval = jerry_eval((jerry_char_t *) exp->code, strlen(exp->code), JERRY_PARSE_NO_OPTS);
|
||||
|
||||
if (jerry_value_is_exception(eval)) {
|
||||
if (jerry_value_is_exception(eval) || jerry_value_is_undefined(eval)) {
|
||||
exp->enabled = false; // The feature is experimental, it will be forcely turned off if it's incompatible.
|
||||
return jerry_undefined();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue