From: Razvan Becheriu Date: Thu, 4 Jul 2019 02:06:35 +0000 (+0300) Subject: [#639,!410] check for null pointer X-Git-Tag: Kea-1.6.0-beta2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=289bc24ca9cc1a51dd1b4b9253d565f66e7946c8;p=thirdparty%2Fkea.git [#639,!410] check for null pointer --- diff --git a/src/lib/dhcpsrv/host_mgr.cc b/src/lib/dhcpsrv/host_mgr.cc index 4ed8b9ee23..6903d9ce84 100644 --- a/src/lib/dhcpsrv/host_mgr.cc +++ b/src/lib/dhcpsrv/host_mgr.cc @@ -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));