mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user