diff --git a/scripting/engine.cpp b/scripting/engine.cpp index a83588ff8f5..3696f0f7647 100644 --- a/scripting/engine.cpp +++ b/scripting/engine.cpp @@ -186,7 +186,7 @@ namespace mongo { } - if ( dbMutex.getState() >= 0 ) + if ( thisTime.size() > 0 && dbMutex.getState() >= 0 ) db->ensureIndex( coll, BSON( "_id" << 1 ) , true ); // --- remove things from scope that were removed