If pipeline has an error then we cannot capture
authorMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 22:50:22 +0000 (01:50 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 23:02:11 +0000 (02:02 +0300)
lib/qtcammode.cpp

index 9cc5721..5c6439a 100644 (file)
@@ -153,7 +153,8 @@ void QtCamMode::deactivate() {
 }
 
 bool QtCamMode::canCapture() {
-  return d_ptr->dev->cameraBin && isActive() && d_ptr->dev->q_ptr->isRunning();
+  return d_ptr->dev->cameraBin && isActive() && d_ptr->dev->q_ptr->isRunning() &&
+    !d_ptr->dev->error;
 }
 
 bool QtCamMode::isActive() {