         println("Do actual capture called:")
         if let session = self.captureSession {
             if session.running == true {
-                println("  Session running - capture in progress")
-                self.imageOutput.captureStillImageAsynchronouslyFromConnection(
-                    self.imageOutput.connectionWithMediaType(AVMediaTypeVideo),
-                    completionHandler: self.handleInputImage
-                )
-                
+                println("  Session running")
+                if let connection = self.imageOutput.connectionWithMediaType(AVMediaTypeVideo) {
+                    println("    Got connection")
+                    if connection.active == true {
+                        println("      Connection active - doing capture")
+                        self.imageOutput.captureStillImageAsynchronouslyFromConnection(
+                            self.imageOutput.connectionWithMediaType(AVMediaTypeVideo),
+                            completionHandler: self.handleInputImage
+                        )
+                    }
+                }
             }
         }
     }

        self.updateOpenButtonWait()
        
        if self.config.boolForKey("useAutoTheme") == true {
            self.captureTimer?.invalidate()
            self.endCaptureSession()
        }
    }

    
    func handleSettingsUpdated() {
        println("View told settings have updated")
        self.setTheme()
        
        if config.boolForKey("useAutoTheme") == true {
            // we know this changed from false to true
            self.setupAutoTheme()
        } else {
            self.captureTimer?.invalidate()
            self.endCaptureSession()
            self.setupWithoutAutoTheme()
        }

        
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
