aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/rtree/rtree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index 9882e7298..8e1eddc1f 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -1908,8 +1908,11 @@ static int rtreeFilter(
}
if( rc==SQLITE_OK ){
RtreeSearchPoint *pNew;
+ assert( pCsr->bPoint==0 ); /* Due to the resetCursor() call above */
pNew = rtreeSearchPointNew(pCsr, RTREE_ZERO, (u8)(pRtree->iDepth+1));
- if( pNew==0 ) return SQLITE_NOMEM;
+ if( NEVER(pNew==0) ){ /* Because pCsr->bPoint was FALSE */
+ return SQLITE_NOMEM;
+ }
pNew->id = 1;
pNew->iCell = 0;
pNew->eWithin = PARTLY_WITHIN;