check for null return from query()

This commit is contained in:
Dwight
2010-08-02 14:44:53 -04:00
parent c43462c6b0
commit 08eaec0599
9 changed files with 17 additions and 5 deletions

View File

@@ -87,6 +87,8 @@ namespace mongo {
auto_ptr<DBClientCursor> cursor =
conn->query( _ns , q , num , 0 , ( _fields.isEmpty() ? 0 : &_fields ) , _options , _batchSize == 0 ? 0 : _batchSize + skipLeft );
assert( cursor.get() );
if ( cursor->hasResultFlag( ResultFlag_ShardConfigStale ) ){
conn.done();