1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Allow the sqlite3_user_data() function to be invoked with a NULL argument

or with an sqlite3_context pointer from a virtual table.  It returns NULL
in both cases.

FossilOrigin-Name: 2f49687371ada65fef374336c28b352c48ab98dc31282ac82397035efe04ba11
This commit is contained in:
drh
2023-09-28 18:23:52 +00:00
parent edbc44c5a1
commit 0a19bb078d
3 changed files with 8 additions and 9 deletions

View File

@@ -845,8 +845,7 @@ int sqlite3_step(sqlite3_stmt *pStmt){
** pointer to it.
*/
void *sqlite3_user_data(sqlite3_context *p){
assert( p && p->pFunc );
return p->pFunc->pUserData;
return (p && p->pFunc) ? p->pFunc->pUserData : 0;
}
/*