diff --git a/src/duplicacy_chunkoperator.go b/src/duplicacy_chunkoperator.go index 6c71f42..4e1671a 100644 --- a/src/duplicacy_chunkoperator.go +++ b/src/duplicacy_chunkoperator.go @@ -489,7 +489,7 @@ func (operator *ChunkOperator) UploadChunk(threadIndex int, task ChunkTask) bool chunk.VerifyID() } - if task.isMetadata && operator.storage.IsCacheNeeded() { + if task.isMetadata && operator.snapshotCache != nil && operator.storage.IsCacheNeeded() { // Save a copy to the local snapshot. chunkPath, exist, _, err := operator.snapshotCache.FindChunk(threadIndex, chunkID, false) if err != nil {