From 9438738693b7376fe8c7485ebc1c69d75a0a016c Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:10:22 +0500 Subject: [PATCH] avoid invalid memory address or nil pointer dereference --- weed/storage/volume.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 14bc5f22d..6d48fbc83 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -260,7 +260,7 @@ func (v *Volume) collectStatus() (maxFileKey types.NeedleId, datFileSize int64, defer v.dataFileAccessLock.RUnlock() glog.V(3).Infof("collectStatus volume %d", v.Id) - if v.nm == nil { + if v.nm == nil || v.DataBackend == nil { return }