aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2021-07-09 14:59:12 +0000
committerdan <Dan Kennedy>2021-07-09 14:59:12 +0000
commit8eed58478677dd9f61920af4df97e86d1b789552 (patch)
treeb71a91495cd191f9b40a6073353184710501478a /src/main.c
parent62f560f805db23e0619740c730e737c9989e75ec (diff)
downloadsqlite-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.c2
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);
}