summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2008-03-31 11:00:26 -0400
committerDwight <dmerriman@gmail.com>2008-03-31 11:00:26 -0400
commit985d443af0c39a46e3c0257a981595f36cbb7665 (patch)
tree75bcb5f00a29d84d1fbdb02cd87f31b5ef6235e0
parente21dfab42e71b4f12351f3a455da8e9f23fe7666 (diff)
downloadmongo-985d443af0c39a46e3c0257a981595f36cbb7665.tar.gz
defensive
-rw-r--r--db/db.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/db/db.cpp b/db/db.cpp
index feb58e0b1f2..0b06c66288f 100644
--- a/db/db.cpp
+++ b/db/db.cpp
@@ -194,8 +194,12 @@ void receivedQuery(AbstractMessagingPort& dbMsgPort, Message& m, stringstream& s
}
Message resp;
resp.setData(msgdata, true); // transport will free
- if( client->profile ) {
- ss << " bytes:" << resp.data->dataLen();
+ if( client ) {
+ if( client->profile )
+ ss << " bytes:" << resp.data->dataLen();
+ }
+ else {
+ cout << "ERROR: client is null; ns=" << ns << endl;
}
dbMsgPort.reply(m, resp);
}