diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index 9570ce1a6..6a2add247 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -36,7 +36,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.229 2003/06/22 01:41:49 drh Exp $ +** $Id: vdbe.c,v 1.230 2003/06/24 10:39:46 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -4213,11 +4213,11 @@ case OP_Recno: { assert( i>=0 && i<p->nCursor ); if( (pC = &p->aCsr[i])->recnoIsValid ){ v = pC->lastRecno; - }else if( pC->nullRow ){ - aStack[tos].flags = STK_Null; - break; }else if( pC->pseudoTable ){ v = keyToInt(pC->iKey); + }else if( pC->nullRow || pC->pCursor==0 ){ + aStack[tos].flags = STK_Null; + break; }else{ assert( pC->pCursor!=0 ); sqliteBtreeKey(pC->pCursor, 0, sizeof(u32), (char*)&v); |