Skip to content

Commit

Permalink
fix(host): add check default mem dev exist on hotplug
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Feb 19, 2025
1 parent 60b8ea0 commit 2897e98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/hostman/guestman/guesttasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2897e98

Please sign in to comment.