diff options
author | drh <> | 2023-09-28 18:23:52 +0000 |
---|---|---|
committer | drh <> | 2023-09-28 18:23:52 +0000 |
commit | 0a19bb078d11d2e0c4cc5183f47adabf34403b95 (patch) | |
tree | a2affec7ce7454ae5d0527f0be714c5940a73a03 /src/vdbeapi.c | |
parent | edbc44c5a165a3ddd47460eb462af685b8917fe3 (diff) | |
download | sqlite-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.c | 3 |
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; } /* |