diff options
-rw-r--r-- | db/dbhelpers.cpp | 1 | ||||
-rw-r--r-- | db/oplog.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/db/dbhelpers.cpp b/db/dbhelpers.cpp index cc4fdba0bde..33ac9b71298 100644 --- a/db/dbhelpers.cpp +++ b/db/dbhelpers.cpp @@ -157,6 +157,7 @@ namespace mongo { } DiskLoc Helpers::findById(NamespaceDetails *d, BSONObj idquery) { + assert(d); int idxNo = d->findIdIndex(); uassert(13430, "no _id index", idxNo>=0); IndexDetails& i = d->idx( idxNo ); diff --git a/db/oplog.cpp b/db/oplog.cpp index b77993eca2b..5c1671c1ac8 100644 --- a/db/oplog.cpp +++ b/db/oplog.cpp @@ -741,7 +741,7 @@ namespace mongo { // of the form // { _id:..., { x : {$size:...} } // thus this is not ideal. - else if( Helpers::findById(nsdetails(ns), updateCriteria).isNull() ) { + else if( nsdetails(ns) == NULL || Helpers::findById(nsdetails(ns), updateCriteria).isNull() ) { failedUpdate = true; } else { |