mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
tinyexpr: Check for null-pointer
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user