Fix panic in StorageInfo call (#9050)

This commit is contained in:
poornas
2020-02-26 15:29:50 -08:00
committed by GitHub
parent eac02c04f7
commit 5d25b10f72

View File

@@ -184,7 +184,7 @@ func (xl xlObjects) StorageInfo(ctx context.Context, local bool) StorageInfo {
disks = xl.getDisks()
} else {
for _, d := range xl.getDisks() {
if d.Hostname() == "" {
if d != nil && d.Hostname() == "" {
// Append this local disk since local flag is true
disks = append(disks, d)
}