Change function according to 1476fb
[apps/agl-service-windowmanager.git] / src / app.cpp
index db00dea..d11ec8a 100644 (file)
@@ -572,8 +572,15 @@ WMError App::do_transition(unsigned req_num)
     * Check Policy
     */
     // get current trigger
-    auto trigger = g_app_list.getRequest(req_num);
+    bool found;
     bool is_activate = true;
+    auto trigger = g_app_list.getRequest(req_num, &found);
+    if(!found)
+    {
+        WMError err = WMError::NO_ENTRY;
+        HMI_SEQ_ERROR(req_num, errorDescription(err));
+        return err;
+    }
 
     /*  get new status from Policy Manager
 
@@ -606,8 +613,14 @@ WMError App::do_transition(unsigned req_num)
 
     // layer manager task
     bool sync_draw_happen = false;
-    for (const auto &y : g_app_list.getActions(req_num))
+    for (const auto &y : g_app_list.getActions(req_num, &found))
     {
+        if (!found)
+        {
+            WMError err = WMError::NO_ENTRY;
+            HMI_SEQ_ERROR(req_num, "%s : Action is not set", errorDescription(err));
+            return err;
+        }
         /*
         do_task(y);
         */
@@ -1006,7 +1019,15 @@ void App::lm_enddraw(const char *drawing_name)
 void App::do_enddraw(unsigned req_num)
 {
     // get actions
-    auto actions = g_app_list.getActions(req_num);
+    bool found;
+    auto actions = g_app_list.getActions(req_num, &found);
+    if (!found)
+    {
+        WMError err = WMError::NO_ENTRY;
+        HMI_SEQ_ERROR(req_num, errorDescription(err));
+        return;
+    }
+
     HMI_SEQ_INFO(req_num, "do endDraw");
 
     for (const auto &act : actions)