mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
xenconfig: fix xml to xl.cfg conversion with no graphics
If no graphics element is in XML xenFormatXLSpice will access graphics without checking it has one in the first place, leading to a segmentation fault. Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
This commit is contained in:
parent
b7feabbfdc
commit
91ac80a986
@ -1168,7 +1168,7 @@ xenFormatXLSpice(virConfPtr conf, virDomainDefPtr def)
|
||||
virDomainGraphicsListenDefPtr glisten;
|
||||
virDomainGraphicsDefPtr graphics;
|
||||
|
||||
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
|
||||
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM && def->graphics) {
|
||||
graphics = def->graphics[0];
|
||||
|
||||
if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user