aboutsummaryrefslogtreecommitdiff
path: root/ext/rtree/rtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/rtree/rtree.c')
-rw-r--r--ext/rtree/rtree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index 946cc6377..0e9a9ba0b 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -2200,7 +2200,7 @@ static int ChooseLeaf(
int nCell = NCELL(pNode);
RtreeCell cell;
- RtreeNode *pChild;
+ RtreeNode *pChild = 0;
RtreeCell *aCell = 0;
@@ -2558,6 +2558,7 @@ static int updateMapping(
pChild->pParent = pNode;
}
}
+ if( NEVER(pNode==0) ) return SQLITE_ERROR;
return xSetMapping(pRtree, iRowid, pNode->iNode);
}