mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 04:57:40 +08:00
tinyexpr: Check for null-pointer
This commit is contained in:
parent
e38de3df64
commit
4c5d586249
@ -586,7 +586,7 @@ double te_eval(const te_expr *n) {
|
||||
|
||||
static void optimize(te_expr *n) {
|
||||
/* Evaluates as much as possible. */
|
||||
if (n->type == TE_CONSTANT) return;
|
||||
if (!n || n->type == TE_CONSTANT) return;
|
||||
|
||||
const int arity = get_arity(n->type);
|
||||
bool known = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user