From 04fc14544a703a46a4a30f84b110a2742328734d Mon Sep 17 00:00:00 2001 From: Vadym Markov Date: Sun, 4 Sep 2016 17:54:14 +0200 Subject: [PATCH] Add guard --- Source/SignalTracking/Units/InputSignalTracker.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/SignalTracking/Units/InputSignalTracker.swift b/Source/SignalTracking/Units/InputSignalTracker.swift index 2244821..240e0cf 100644 --- a/Source/SignalTracking/Units/InputSignalTracker.swift +++ b/Source/SignalTracking/Units/InputSignalTracker.swift @@ -68,6 +68,10 @@ public class InputSignalTracker: SignalTracker { } public func stop() { + guard audioEngine != nil else { + return + } + audioEngine?.stop() audioEngine?.reset() audioEngine = nil