mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
[Vmware] Prevent NPE on template registration if guest OS is removed (#5980)
This commit is contained in:
parent
212a4dedfc
commit
7f0a322b7d
@ -176,8 +176,8 @@ public class DeployAsIsHelperImpl implements DeployAsIsHelper {
|
||||
} else {
|
||||
if (StringUtils.isNotEmpty(guestOsDescription)) {
|
||||
for (GuestOSHypervisorVO guestOSHypervisorVO : guestOsMappings) {
|
||||
GuestOSVO guestOSVO = guestOSDao.findById(guestOSHypervisorVO.getGuestOsId());
|
||||
if (guestOsDescription.equalsIgnoreCase(guestOSVO.getDisplayName())) {
|
||||
GuestOSVO guestOSVO = guestOSDao.findByIdIncludingRemoved(guestOSHypervisorVO.getGuestOsId());
|
||||
if (guestOSVO != null && guestOsDescription.equalsIgnoreCase(guestOSVO.getDisplayName())) {
|
||||
guestOsId = guestOSHypervisorVO.getGuestOsId();
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user