1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-09-02 12:21:26 +03:00

Prevent a virtual table from being destroyed while it is in use.

FossilOrigin-Name: fba674c083286dabb37fed9357b67593b56ed3a5
This commit is contained in:
drh
2015-03-24 13:32:53 +00:00
parent 086723a4a8
commit a68d628291
6 changed files with 22 additions and 18 deletions

View File

@@ -1782,6 +1782,8 @@ void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
else if( pCx->pVtabCursor ){
sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor;
const sqlite3_module *pModule = pVtabCursor->pVtab->pModule;
assert( pVtabCursor->pVtab->nRef>0 );
pVtabCursor->pVtab->nRef--;
pModule->xClose(pVtabCursor);
}
#endif