You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Error running Expression.execute after parse error
There happens a segmentation fault when you use Expression.parse() and you don't check for errors and then run Expression.execute(). So we check if there was a parse error in the execute method now.
This commit is contained in:
@@ -2120,6 +2120,10 @@ Error Expression::parse(const String &p_expression, const Vector<String> &p_inpu
|
|||||||
}
|
}
|
||||||
|
|
||||||
Variant Expression::execute(Array p_inputs, Object *p_base, bool p_show_error) {
|
Variant Expression::execute(Array p_inputs, Object *p_base, bool p_show_error) {
|
||||||
|
if (error_set) {
|
||||||
|
ERR_EXPLAIN("There was previously a parse error: " + error_str);
|
||||||
|
ERR_FAIL_V(Variant());
|
||||||
|
}
|
||||||
|
|
||||||
execution_error = false;
|
execution_error = false;
|
||||||
Variant output;
|
Variant output;
|
||||||
|
|||||||
Reference in New Issue
Block a user