kvm: Fix NPE in case host UEFI detail is not set on agent connection (#11610)

This commit is contained in:
Nicolas Vazquez 2025-09-11 05:40:08 -03:00 committed by GitHub
parent e64e94ad3f
commit 036fd00170
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -710,7 +710,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
if (ObjectUtils.anyNotNull(uefiEnabled, virtv2vVersion, ovftoolVersion)) {
_hostDao.loadDetails(host);
boolean updateNeeded = false;
if (!uefiEnabled.equals(host.getDetails().get(Host.HOST_UEFI_ENABLE))) {
if (StringUtils.isNotBlank(uefiEnabled) && !uefiEnabled.equals(host.getDetails().get(Host.HOST_UEFI_ENABLE))) {
host.getDetails().put(Host.HOST_UEFI_ENABLE, uefiEnabled);
updateNeeded = true;
}