diff --git a/Classes/Editor/MultiEditor/MultiEditorViewController.swift b/Classes/Editor/MultiEditor/MultiEditorViewController.swift index a6731b19b..57c0f6b0c 100644 --- a/Classes/Editor/MultiEditor/MultiEditorViewController.swift +++ b/Classes/Editor/MultiEditor/MultiEditorViewController.swift @@ -387,12 +387,14 @@ extension MultiEditorViewController: EditorControllerDelegate { editor.export { [weak self, editor] result in let _ = editor // strong reference until the export completes self?.exportHandler.handleExport(result, for: idx) - if let selected = self?.selected { - self?.loadEditor(for: selected, current: false) - } } } }) + + if let selected = self.selected { + loadEditor(for: selected, current: true) + } + return false } diff --git a/Classes/Rendering/Renderer.swift b/Classes/Rendering/Renderer.swift index 01b45b692..1a8ec119b 100644 --- a/Classes/Rendering/Renderer.swift +++ b/Classes/Rendering/Renderer.swift @@ -163,6 +163,8 @@ final class Renderer: Rendering { /// For this to work, all access to filteredPixelBuffer should be locked, so this method should be called in /// a synchronized(self) block. private func output(filteredPixelBuffer: CVPixelBuffer) { + guard let delegate = self.delegate else { return } + self.filteredPixelBuffer = filteredPixelBuffer callbackQueue.async { let pixelBuffer: CVPixelBuffer? = synchronized(self) { @@ -173,7 +175,7 @@ final class Renderer: Rendering { return pixelBuffer } if let filteredPixelBuffer = pixelBuffer { - self.delegate?.rendererReadyForDisplay(pixelBuffer: filteredPixelBuffer) + delegate.rendererReadyForDisplay(pixelBuffer: filteredPixelBuffer) } } } diff --git a/Kanvas.podspec b/Kanvas.podspec index cf1ad616b..904ff71f4 100644 --- a/Kanvas.podspec +++ b/Kanvas.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |spec| spec.name = 'Kanvas' - spec.version = '1.4.2' + spec.version = '1.4.3' spec.summary = 'A custom camera built for iOS.' spec.homepage = 'https://github.com/tumblr/kanvas-ios' spec.license = 'MPLv2'