Do not try to handle not-installed apps
[staging/HomeScreen.git] / HomeScreen / qml / Home.qml
index 94c10b4..3c8f109 100644 (file)
@@ -50,11 +50,16 @@ Item {
             onClicked: {
                 console.log("app is ", model.id)
                 pid = launcher.launch(model.id)
-                layoutHandler.makeMeVisible(pid)
+                if (1 < pid) {
+                    layoutHandler.makeMeVisible(pid)
 
-                applicationArea.visible = true
-                appLauncherAreaLauncher.visible = false
-                layoutHandler.showAppLayer()
+                    applicationArea.visible = true
+                    appLauncherAreaLauncher.visible = false
+                    layoutHandler.showAppLayer()
+                }
+                else {
+                    console.warn("app cannot be launched!")
+                }
             }
         }
     }