Skip to content

Commit

Permalink
Adjusted when transfer variables are reset to avoid a later crash whe…
Browse files Browse the repository at this point in the history
…n accessing values (#33)
  • Loading branch information
nathanblamires committed Feb 6, 2020
1 parent b1d9da9 commit a4c95e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Managers/FileSystemManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ public class FileSystemManager: McuManager {
// Check if the upload has completed.
if self.offset == self.fileData!.count {
Log.d(FileSystemManager.TAG, msg: "Download finished!")
self.resetTransfer()
self.downloadDelegate?.download(of: self.fileName!, didFinish: self.fileData!)
self.resetTransfer()
self.downloadDelegate = nil
// Release cyclic reference.
self.cyclicReferenceHolder = nil
Expand Down

0 comments on commit a4c95e7

Please sign in to comment.