bug 13829: Fix NPE in ExternalFirewallDeviceManagerImpl

Reviewed-by: Edison
This commit is contained in:
Sheng Yang 2012-02-17 13:24:38 -08:00
parent 107e4a403e
commit 59bdf2dd83
1 changed files with 5 additions and 0 deletions

View File

@ -363,6 +363,11 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
}
} else {
ExternalFirewallDeviceVO fwDeviceVO = getExternalFirewallForNetwork(network);
if (fwDeviceVO == null) {
s_logger.warn("Network shutdown requested on external firewall element, which did not implement the network." +
" Either network implement failed half way through or already network shutdown is completed.");
return true;
}
externalFirewall = _hostDao.findById(fwDeviceVO.getHostId());
}