]> git.proxmox.com Git - pve-container.git/commitdiff
config: snapshot_delete_remove_drive: check for parsed value
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 13 Jan 2022 11:04:03 +0000 (12:04 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 28 Jan 2022 13:31:13 +0000 (14:31 +0100)
parse_volume is called with noerr=1, so this might be undef instead
of the hash we expect.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/LXC/Config.pm

index 6c2acd636826e5ae4a42d01f4597aacb38ed7dc8..32d990c39d88bbe6d0a110eba59c8c74cbe151b8 100644 (file)
@@ -192,7 +192,7 @@ sub __snapshot_delete_remove_drive {
        delete $snap->{$remove_drive};
 
        $class->add_unused_volume($snap, $mountpoint->{volume})
-           if ($mountpoint->{type} eq 'volume');
+           if $mountpoint && ($mountpoint->{type} eq 'volume');
     }
 }