1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

The xDestroy method of a module might be NULL if the schema is corrupt.

FossilOrigin-Name: 0457e7d1961ab1f63e31d9028a9064a895f5c3fcfb56ba25e4f37e90197e3a9f
This commit is contained in:
drh
2019-12-11 14:25:11 +00:00
parent e94006eb42
commit 31046a9f1f
3 changed files with 8 additions and 9 deletions

View File

@@ -892,9 +892,8 @@ int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
}
p = vtabDisconnectAll(db, pTab);
xDestroy = p->pMod->pModule->xDestroy;
assert( xDestroy!=0 ); /* Checked before the virtual table is created */
pTab->nTabRef++;
rc = xDestroy(p->pVtab);
rc = xDestroy ? xDestroy(p->pVtab) : SQLITE_OK;
/* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */
if( rc==SQLITE_OK ){
assert( pTab->pVTable==p && p->pNext==0 );