Permalink
Browse files

fix oplog replay segfault SERVER-4350

  • Loading branch information...
1 parent 2a44861 commit bd438596e1f9808663af9c476f0a08940b19df35 @erh erh committed Nov 23, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 db/dbhelpers.cpp
  2. +1 −1 db/oplog.cpp
View
@@ -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 );
View
@@ -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 {

0 comments on commit bd43859

Please sign in to comment.