1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

shared/archive: Fix crash on nil tracker

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-11-29 09:00:13 -05:00
parent 1ba93c21dd
commit c049bac24c

View File

@@ -188,7 +188,7 @@ func Unpack(file string, path string, blockBackend bool, maxMemory int64, tracke
}
} else if strings.HasPrefix(extension, ".squashfs") {
// Progress tracking with squashfs doesn't work as it needs to seek the file.
if tracker.Handler != nil {
if tracker != nil && tracker.Handler != nil {
tracker.Handler(0, 0)
}