fix(host): add check default mem dev exist on hotplug (#22140)

This commit is contained in:
wanyaoqi
2025-02-21 10:21:06 +08:00
committed by GitHub
parent 6e0f595d8a
commit f4bcf38f72
+1 -1
View File
@@ -2474,7 +2474,7 @@ func (task *SGuestHotplugCpuMemTask) Start() {
}
func (task *SGuestHotplugCpuMemTask) startAddCpu() {
if task.Desc.MemDesc.Mem.Cpus != nil && len(task.Desc.CpuNumaPin) > 0 {
if task.Desc.MemDesc.Mem != nil && task.Desc.MemDesc.Mem.Cpus != nil && len(task.Desc.CpuNumaPin) > 0 {
task.buildVcpusMap()
} else {
task.Monitor.GetCpuCount(task.onGetCpuCount)