Fix some QML TypError resulting from overlay.cam being null
[harmattan/cameraplus] / qml / ImageOverlay.qml
index f191b35..abcadbc 100644 (file)
@@ -33,6 +33,7 @@ Item {
     property bool pressed: capture.pressed || zoomSlider.pressed || modeButton.pressed
     property bool controlsVisible: imageMode.canCapture && cam.running && !animationRunning
         && dimmer.opacity == 0.0 && !cameraMode.busy
+    property bool inhibitDim: false
 
     signal previewAvailable(string uri)
 
@@ -106,7 +107,7 @@ Item {
         id: captureControl
         capturePressed: capture.pressed
         zoomPressed: zoomCapture.zoomPressed
-        proximityClosed: proximitySensor.close
+        proximityClosed: proximitySensor.sensorClosed
         onStartCapture: captureImage()
         onCancelCapture: stopAutoFocus()
     }
@@ -131,7 +132,7 @@ Item {
         tools: CameraToolBarTools {
             FlashButton {
                 onClicked: toolBar.push(tools)
-                visible: !overlay.cam.quirks.hasQuirk(Quirks.NoFlash)
+                visible: overlay.cam ? !overlay.cam.quirks.hasQuirk(Quirks.NoFlash) : false
             }
 
             ImageSceneButton {