mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Avoid segfaulting on an incremental blob write if SQLITE_ENABLE_PREUPDATE_HOOK
set but no pre-update hooks are defined. FossilOrigin-Name: 62c446340475b52b843c0345eda32ebe86fa9159
This commit is contained in:
@@ -392,7 +392,7 @@ static int blobReadWrite(
|
||||
sqlite3BtreeEnterCursor(p->pCsr);
|
||||
|
||||
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||
if( xCall==sqlite3BtreePutData ){
|
||||
if( xCall==sqlite3BtreePutData && db->xPreUpdateCallback ){
|
||||
/* If a pre-update hook is registered and this is a write cursor,
|
||||
** invoke it here.
|
||||
**
|
||||
|
||||
Reference in New Issue
Block a user