Don't check camera mode if cam is null
authorMohammed Sameer <msameer@foolab.org>
Sun, 23 Sep 2012 00:21:09 +0000 (03:21 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 23 Sep 2012 00:21:09 +0000 (03:21 +0300)
qml/ModeController.qml

index 73998e5..8d0cd58 100644 (file)
@@ -58,6 +58,10 @@ Item {
         }
 
         function set(newMode) {
+                if (!cam) {
+                        return;
+                }
+
                 if (cam.mode == newMode) {
                         return;
                 }