summaryrefslogtreecommitdiffstats
path: root/src/homescreen.cpp
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-07-29 11:48:57 +0300
committerMarius Vlad <marius.vlad@collabora.com>2021-07-29 11:48:57 +0300
commit36574a78bc7baaf3dd254ed91641fd993fc90c14 (patch)
tree93205292f79d6dc0a5ce34c1c4e79a1e0dd5a390 /src/homescreen.cpp
parent66d1ba22264303e705bbe126578c0c99cdb80dba (diff)
Bug-AGL: SPEC-4037 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I6a9b7fd74d81cb117afcb12639862288769b7fde
Diffstat (limited to 'src/homescreen.cpp')
-rw-r--r--src/homescreen.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/homescreen.cpp b/src/homescreen.cpp
index 8470635..49850be 100644
--- a/src/homescreen.cpp
+++ b/src/homescreen.cpp
@@ -162,9 +162,13 @@ static void tap_shortcut (afb_req_t request)
ret = g_hs_instance->client_manager->handleRequest(request, __FUNCTION__, value);
if(ret == AFB_REQ_NOT_STARTED_APPLICATION) {
std::string id = g_hs_instance->app_info->getAppProperty(value, _keyId);
- HS_AfmMainProxy afm_proxy;
- afm_proxy.start(g_hs_instance, request, id);
- ret = 0;
+ if (!id.empty()) {
+ HS_AfmMainProxy afm_proxy;
+ afm_proxy.start(g_hs_instance, request, id);
+ ret = 0;
+ } else {
+ ret = AFB_EVENT_BAD_REQUEST;
+ }
}
}
else {
@@ -314,9 +318,13 @@ static void showWindow(afb_req_t request)
ret = g_hs_instance->client_manager->handleRequest(request, __FUNCTION__, value);
if(ret == AFB_REQ_NOT_STARTED_APPLICATION) {
std::string id = g_hs_instance->app_info->getAppProperty(value, _keyId);
- HS_AfmMainProxy afm_proxy;
- afm_proxy.start(g_hs_instance, request, id);
- ret = 0;
+ if (!id.empty()) {
+ HS_AfmMainProxy afm_proxy;
+ afm_proxy.start(g_hs_instance, request, id);
+ ret = 0;
+ } else {
+ ret = AFB_EVENT_BAD_REQUEST;
+ }
}
}
else {