diff --git a/components/ido_mysql/mysqldbconnection.cpp b/components/ido_mysql/mysqldbconnection.cpp index 0a52b25da..d0294d3e9 100644 --- a/components/ido_mysql/mysqldbconnection.cpp +++ b/components/ido_mysql/mysqldbconnection.cpp @@ -237,6 +237,10 @@ Dictionary::Ptr MysqlDbConnection::FetchRow(MYSQL_RES *result) void MysqlDbConnection::ActivateObject(const DbObject::Ptr& dbobj) { boost::mutex::scoped_lock lock(m_ConnectionMutex); + + if (!m_Connected) + return; + DbReference dbref = GetReference(dbobj); std::ostringstream qbuf; @@ -256,6 +260,9 @@ void MysqlDbConnection::DeactivateObject(const DbObject::Ptr& dbobj) { boost::mutex::scoped_lock lock(m_ConnectionMutex); + if (!m_Connected) + return; + DbReference dbref = GetReference(dbobj); if (!dbref.IsValid())