Commit 289bc24c authored by Razvan Becheriu's avatar Razvan Becheriu
Browse files

[#639,!410] check for null pointer

parent 5cbf42b1
......@@ -48,7 +48,8 @@ HostMgr::addBackend(const std::string& access) {
bool
HostMgr::delBackend(const std::string& db_type) {
if (getHostMgrPtr()->cache_ptr_->getType() == db_type) {
if (getHostMgrPtr()->cache_ptr_ &&
getHostMgrPtr()->cache_ptr_->getType() == db_type) {
getHostMgrPtr()->cache_ptr_.reset();
}
return (HostDataSourceFactory::del(getHostMgrPtr()->alternate_sources_, db_type));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment