]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer.pm
fix #2032: check that type is set before using
[qemu-server.git] / PVE / QemuServer.pm
index 4a6a6ccc49996b81dfbd03ea94d8c4453022fc69..38b511e90bb6b80cc068e00e798db6801d7c9e25 100644 (file)
@@ -2023,7 +2023,7 @@ sub print_vga_device {
     my ($conf, $vga, $arch, $machine, $id, $qxlnum, $bridges) = @_;
 
     my $type = $vga_map->{$vga->{type}};
-    if ($type eq 'virtio-vga' && $arch eq 'aarch64') {
+    if ($arch eq 'aarch64' && defined($type) && $type eq 'virtio-vga') {
        $type = 'virtio-gpu';
     }
     my $vgamem_mb = $vga->{memory};