Index: src/where.c ================================================================== --- src/where.c +++ src/where.c @@ -5868,11 +5868,11 @@ /* For a co-routine, change all OP_Column references to the table of ** the co-routine into OP_SCopy of result contained in a register. ** OP_Rowid becomes OP_Null. */ - if( pTabItem->viaCoroutine ){ + if( pTabItem->viaCoroutine && !db->mallocFailed ){ last = sqlite3VdbeCurrentAddr(v); k = pLevel->addrBody; pOp = sqlite3VdbeGetOp(v, k); for(; kp1!=pLevel->iTabCur ) continue;