Fix a bug in where.c introduced by check-in (5373). (CVS 5375)
FossilOrigin-Name: 1ed98f9e617fb422efc37c4a3a5c5f0702467868
diff --git a/src/where.c b/src/where.c
index 97edf5b..069b707 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.312 2008/07/08 18:05:26 drh Exp $
+** $Id: where.c,v 1.313 2008/07/08 19:45:02 drh Exp $
*/
#include "sqliteInt.h"
@@ -2157,8 +2157,7 @@
ppIdxInfo);
flags = WHERE_VIRTUALTABLE;
pIndex = *ppIdxInfo;
- assert( pIndex!=0 );
- if( pIndex->orderByConsumed ){
+ if( pIndex && pIndex->orderByConsumed ){
flags = WHERE_VIRTUALTABLE | WHERE_ORDERBY;
}
pIdx = 0;