aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 8397fbc10..bd00786eb 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -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