         
         
         // apply all render passes in the current filter
-        let filterParameters = [_filterArgs.bufferAndOffsetForElement(_currentFilterBuffer)]
-        for (_, filter) in _currentVideoFilter.enumerate() {
-            createRenderPass(commandBuffer,
-                             pipeline: filter,
-                             vertexIndex: 0,
-                             fragmentBuffers: filterParameters,
-                             sourceTextures: [sourceTexture, blurTex, _rgbTexture],
-                             descriptor: destDescriptor,
-                             viewport: nil)
-            
-            swapTextures()
-        }
-        
-        
-        if let screenDescriptor = view.currentRenderPassDescriptor {
+        if  let filterArgs = _filterArgs,
+            let screenDescriptor = view.currentRenderPassDescriptor {
+            
+            let filterParameters = [filterArgs.bufferAndOffsetForElement(_currentFilterBuffer)]
+            for (_, filter) in _currentVideoFilter.enumerate() {
+                createRenderPass(commandBuffer,
+                                 pipeline: filter,
+                                 vertexIndex: 0,
+                                 fragmentBuffers: filterParameters,
+                                 sourceTextures: [sourceTexture, blurTex, _rgbTexture],
+                                 descriptor: destDescriptor,
+                                 viewport: nil)
+                
+                swapTextures()
+            }
             
             createRenderPass(commandBuffer,
                              pipeline: invertScreen ? _screenInvertState! : _screenBlitState!,

        defer {
            objc_sync_exit(self)
        }
        
        let scale = UIScreen.mainScreen().nativeScale
        

            -1.0,   1.0,  1.0, 0.0,
            1.0,  -1.0,  0.0, 1.0,
            -1.0,   1.0,  1.0, 0.0,
            1.0,   1.0,  1.0, 1.0
        ]
        
        // set up vertex buffer
        let dataSize = data.count * sizeofValue(data[0]) // 1
        let options = MTLResourceOptions.StorageModeShared.union(MTLResourceOptions.CPUCacheModeDefaultCache)
        _vertexBuffer = device.newBufferWithBytes(data, length: dataSize, options: options)

        // set vertex indicies start for each rotation
        _vertexStart[.LandscapeRight] = 0
