             movieOutput = AVCaptureMovieFileOutput()
             movieOutput!.movieFragmentInterval = kCMTimeInvalid
 
-            captureSession?.beginConfiguration()
-            captureSession?.addOutput(movieOutput)
-            captureSession?.commitConfiguration()
+            if let captureSession = captureSession {
+                if captureSession.canAddOutput(movieOutput) {
+                    captureSession.beginConfiguration()
+                    captureSession.addOutput(movieOutput)
+                    captureSession.commitConfiguration()
+                }
+            }
         }
         return movieOutput!
     }

                _setupOutputs()
            }
            if let validStillImageOutput = stillImageOutput {
                captureSession?.addOutput(validStillImageOutput)
            }
        case .VideoOnly, .VideoWithMic:
            captureSession?.addOutput(_getMovieOutput())

        if shouldReinitializeStillImageOutput {
            stillImageOutput = AVCaptureStillImageOutput()
            
            if let captureSession = captureSession {
                if captureSession.canAddOutput(stillImageOutput) {
                    captureSession.beginConfiguration()
                    captureSession.addOutput(stillImageOutput)
                    captureSession.commitConfiguration()
                }
            }
        }
        return stillImageOutput!
    }
