aboutsummaryrefslogtreecommitdiff
path: root/src/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve.c')
-rw-r--r--src/resolve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c
index b0adb8629..07e0e919a 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -380,8 +380,8 @@ static int lookupName(
/*
** Perhaps the name is a reference to the ROWID
*/
- assert( pTab!=0 || cntTab==0 );
- if( cnt==0 && cntTab==1 && sqlite3IsRowid(zCol) && HasRowid(pTab) ){
+ if( cnt==0 && cntTab==1 && pMatch && sqlite3IsRowid(zCol)
+ && HasRowid(pMatch->pTab) ){
cnt = 1;
pExpr->iColumn = -1; /* IMP: R-44911-55124 */
pExpr->affinity = SQLITE_AFF_INTEGER;