diff options
Diffstat (limited to 'storage/connect/cmgoconn.cpp')
-rw-r--r-- | storage/connect/cmgoconn.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/connect/cmgoconn.cpp b/storage/connect/cmgoconn.cpp index edee1874b97..474f940a8cf 100644 --- a/storage/connect/cmgoconn.cpp +++ b/storage/connect/cmgoconn.cpp @@ -150,6 +150,12 @@ void CMgoConn::mongo_init(bool init) /***********************************************************************/ bool CMgoConn::Connect(PGLOBAL g) { + if (!Pcg->Db_name || !Pcg->Coll_name) { + // This would crash in mongoc_client_get_collection + strcpy(g->Message, "Missing DB or collection name"); + return true; + } // endif name + if (!IsInit) #if defined(__WIN__) __try { |