Skip to content

Commit 5ce75d7

Browse files
committed
Return error from vtable cursor open instead of ignoring it
1 parent 78710fc commit 5ce75d7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sqlite3_opt_vtable.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ uintptr_t goVOpen(void *pVTab, char **pzErr);
113113
114114
static int cXOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor) {
115115
void *vTabCursor = (void *)goVOpen(((goVTab*)pVTab)->vTab, &(pVTab->zErrMsg));
116+
if (!vTabCursor) {
117+
return SQLITE_ERROR;
118+
}
116119
goVTabCursor *pCursor = (goVTabCursor *)sqlite3_malloc(sizeof(goVTabCursor));
117120
if (!pCursor) {
118121
return SQLITE_NOMEM;

0 commit comments

Comments
 (0)