Index: ext/rtree/rtree.c ================================================================== --- ext/rtree/rtree.c +++ ext/rtree/rtree.c @@ -437,12 +437,15 @@ if( rc==SQLITE_OK && iNode==1 ){ pRtree->iDepth = readInt16(pNode->zData); } - assert( (rc==SQLITE_OK && pNode) || (pNode==0 && rc!=SQLITE_OK) ); - nodeHashInsert(pRtree, pNode); + if( pNode!=0 ){ + nodeHashInsert(pRtree, pNode); + }else if( rc==SQLITE_OK ){ + rc = SQLITE_CORRUPT; + } return rc; } /*