aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/where.c5
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