aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
authordrh <>2023-09-28 18:23:52 +0000
committerdrh <>2023-09-28 18:23:52 +0000
commit0a19bb078d11d2e0c4cc5183f47adabf34403b95 (patch)
treea2affec7ce7454ae5d0527f0be714c5940a73a03 /src/vdbeapi.c
parentedbc44c5a165a3ddd47460eb462af685b8917fe3 (diff)
downloadsqlite-0a19bb078d11d2e0c4cc5183f47adabf34403b95.tar.gz
sqlite-0a19bb078d11d2e0c4cc5183f47adabf34403b95.zip
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
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r--src/vdbeapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 1213dbe6d..6b32506f9 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -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;
}
/*