aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2021-04-14 11:20:44 +0000
committerdrh <>2021-04-14 11:20:44 +0000
commitf817189e1b35a15c187c7515a78e12894096366c (patch)
tree23d138e92b726c4f1f244a2ba1c0a59ba4dea660 /src/expr.c
parent304cbc17c245e93a54d51225d99d821eccb3c5f5 (diff)
downloadsqlite-f817189e1b35a15c187c7515a78e12894096366c.tar.gz
sqlite-f817189e1b35a15c187c7515a78e12894096366c.zip
Fix an assert() in the code generator for expressions so that it is valid
even after an OOM. FossilOrigin-Name: 427e83eb583a4f63650912f078122e7373fe8c7ea11acfdab464d748b4235261
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index acc144bea..898ed8519 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -4016,7 +4016,7 @@ expr_code_doover:
** Expr node to be passed into this function, it will be handled
** sanely and not crash. But keep the assert() to bring the problem
** to the attention of the developers. */
- assert( op==TK_NULL );
+ assert( op==TK_NULL || pParse->db->mallocFailed );
sqlite3VdbeAddOp2(v, OP_Null, 0, target);
return target;
}