aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-04-18 00:13:26 -0700
committerGitHub <noreply@github.com>2022-04-18 00:13:26 -0700
commit97c6e0efb195c50948871279f538b8a1f233ff7c (patch)
tree06ceb96d94215521e6b85206a9660406214da547 /weed/storage/volume.go
parenta69f0b62c2a22785b448a4cb29499b4d1410f1ca (diff)
parent9438738693b7376fe8c7485ebc1c69d75a0a016c (diff)
downloadseaweedfs-97c6e0efb195c50948871279f538b8a1f233ff7c.tar.xz
seaweedfs-97c6e0efb195c50948871279f538b8a1f233ff7c.zip
Merge pull request #2931 from kmlebedev/fix_nil_dataBackend
avoid invalid memory address or nil pointer dereference
Diffstat (limited to 'weed/storage/volume.go')
-rw-r--r--weed/storage/volume.go2
1 files changed, 1 insertions, 1 deletions
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
}