From c103884d09b9810a06b46a8b3e1af51f28a6c331 Mon Sep 17 00:00:00 2001 From: dwight Date: Tue, 6 Jul 2010 16:11:56 -0400 Subject: better diag screen rs --- bson/bson_db.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bson') diff --git a/bson/bson_db.h b/bson/bson_db.h index c764887ef97..9d0cadc948c 100644 --- a/bson/bson_db.h +++ b/bson/bson_db.h @@ -41,7 +41,9 @@ namespace mongo { } inline OpTime BSONElement::_opTime() const { - return OpTime( *reinterpret_cast< const unsigned long long* >( value() ) ); + if( type() == mongo::Date || type() == Timestamp ) + return OpTime( *reinterpret_cast< const unsigned long long* >( value() ) ); + return OpTime(); } inline string BSONElement::_asCode() const { -- cgit v1.2.1