diff --git a/pkg/local_object_storage/shard/control.go b/pkg/local_object_storage/shard/control.go index 8cb465759..0a2506a1f 100644 --- a/pkg/local_object_storage/shard/control.go +++ b/pkg/local_object_storage/shard/control.go @@ -261,7 +261,10 @@ func (s *Shard) Close() error { } } - s.gc.stop() + // If Init/Open was unsuccessful gc can be nil. + if s.gc != nil { + s.gc.stop() + } return nil }