solidfire: fix potential NPE

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2018-04-30 17:35:01 +05:30 committed by Rohit Yadav
parent 314caffcd7
commit 2be45c2186
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ public class SolidFireHostListener implements HypervisorHostListener {
}
private void handleVMware(HostVO host, boolean add, ModifyTargetsCommand.TargetTypeToRemove targetTypeToRemove) {
if (HypervisorType.VMware.equals(host.getHypervisorType())) {
if (host != null && HypervisorType.VMware.equals(host.getHypervisorType())) {
List<StoragePoolVO> storagePools = _storagePoolDao.findPoolsByProvider(SolidFireUtil.PROVIDER_NAME);
if (storagePools != null && storagePools.size() > 0) {