Commit 28d05ba5 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Fixed crash if no VMs found

parent 07cc81c5
......@@ -607,7 +607,10 @@ sub search_vm {
confess "Missing VM type" if !$type;
my $class = 'Ravada::VM::'.uc($type);
for my $vm (@{$self->vm}) {
my @vms;
eval { @vms = @{$self->vm} };
for my $vm (@vms) {
return $vm if ref($vm) eq $class;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment