diff options
author | danielk1977 <danielk1977@noemail.net> | 2009-04-21 17:23:04 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2009-04-21 17:23:04 +0000 |
commit | 732dc5526bafbf7962024c76bd1f677754d1f43b (patch) | |
tree | 0e519cce29c41a9fcc25df200cfbaaccd4cbf570 /src | |
parent | 84fe066470c5a9539ea96dfbc8f4ff8093a7d0d0 (diff) | |
download | sqlite-732dc5526bafbf7962024c76bd1f677754d1f43b.tar.gz sqlite-732dc5526bafbf7962024c76bd1f677754d1f43b.zip |
Fix a segfault that followed a malloc failure introduced by (6527). (CVS 6532)
FossilOrigin-Name: 08e71b114087cfddd36c066265982172fcb41c9a
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 9c2fdf52a..2ff863749 100644 --- a/src/where.c +++ b/src/where.c @@ -16,7 +16,7 @@ ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** -** $Id: where.c,v 1.383 2009/04/21 09:02:47 danielk1977 Exp $ +** $Id: where.c,v 1.384 2009/04/21 17:23:05 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -1755,6 +1755,9 @@ static void bestVirtualIndex( if( pIdxInfo==0 ){ *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy); } + if( pIdxInfo==0 ){ + return; + } /* At this point, the sqlite3_index_info structure that pIdxInfo points ** to will have been initialized, either during the current invocation or |