Skip to content

Commit

Permalink
Add guard
Browse files Browse the repository at this point in the history
  • Loading branch information
vadymmarkov committed Sep 4, 2016
1 parent e83eeb7 commit 04fc145
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/SignalTracking/Units/InputSignalTracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public class InputSignalTracker: SignalTracker {
}

public func stop() {
guard audioEngine != nil else {
return
}

audioEngine?.stop()
audioEngine?.reset()
audioEngine = nil
Expand Down

0 comments on commit 04fc145

Please sign in to comment.