diff options
author | dan <Dan Kennedy> | 2021-07-09 14:59:12 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2021-07-09 14:59:12 +0000 |
commit | 8eed58478677dd9f61920af4df97e86d1b789552 (patch) | |
tree | b71a91495cd191f9b40a6073353184710501478a /src/main.c | |
parent | 62f560f805db23e0619740c730e737c9989e75ec (diff) | |
download | sqlite-8eed58478677dd9f61920af4df97e86d1b789552.tar.gz sqlite-8eed58478677dd9f61920af4df97e86d1b789552.zip |
Fix an assert() that might fail if sqlite3_create_function_v2() is invoked with NULL xStep and xFinal callbacks and a non-NULL xDestroy.
FossilOrigin-Name: ab1550a608684b6b9104b555a975482cfabca5053b7d7dcc60d63a0e3a8d707d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index ca796b12c..fc0fa6ad1 100644 --- a/src/main.c +++ b/src/main.c @@ -1977,7 +1977,7 @@ static int createFunctionApi( xSFunc, xStep, xFinal, xValue, xInverse, pArg ); if( pArg && pArg->nRef==0 ){ - assert( rc!=SQLITE_OK ); + assert( rc!=SQLITE_OK || (xStep==0 && xFinal==0) ); xDestroy(p); sqlite3_free(pArg); } |