diff options
author | dan <dan@noemail.net> | 2015-01-21 17:00:57 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2015-01-21 17:00:57 +0000 |
commit | ce8f53d44761a6735b4c9ad6a58e55347e8b89d1 (patch) | |
tree | f37f7fae0937153db10ec18deae8261014a78fee /src/expr.c | |
parent | 1b3ee49225e9fb46a3d8d1dbbca160885ae6dc9f (diff) | |
download | sqlite-ce8f53d44761a6735b4c9ad6a58e55347e8b89d1.tar.gz sqlite-ce8f53d44761a6735b4c9ad6a58e55347e8b89d1.zip |
Fix an assert() that may fail following an OOM error.
FossilOrigin-Name: 5f592359d6d41708da3b3ac9d987a1631bfa3d88
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index 32adedf9b..64fb3c5fd 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2256,7 +2256,8 @@ void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){ int idxLru; struct yColCache *p; - assert( iReg>0 ); /* Register numbers are always positive */ + /* Unless an error has occurred, register numbers are always positive. */ + assert( iReg>0 || pParse->nErr || pParse->db->mallocFailed ); assert( iCol>=-1 && iCol<32768 ); /* Finite column numbers */ /* The SQLITE_ColumnCache flag disables the column cache. This is used |