Fix crash when specified wakeup engine does not exist 56/262356/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 9 Aug 2021 04:57:27 +0000 (13:57 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 9 Aug 2021 04:57:12 +0000 (13:57 +0900)
Change-Id: I6e26ba9dc10031c45886491e9e1235602ebfca0b

plugins/wakeup-manager/src/wakeup_engine_manager.cpp

index b458553..a771a0e 100644 (file)
@@ -560,9 +560,9 @@ void CWakeupEngineManager::engine_add_target_assistant(string engine_name, strin
                        });
                if (mEngineInfo.end() != new_iter) {
                        new_iter->assistant_list.push_back(appid);
-               }
-               for (const auto assistant : new_iter->assistant_list) {
-                       MWR_LOGI("Assistant List : %s %s", assistant.c_str(), new_iter->engine_name.c_str());
+                       for (const auto assistant : new_iter->assistant_list) {
+                               MWR_LOGI("Assistant List : %s %s", assistant.c_str(), new_iter->engine_name.c_str());
+                       }
                }
        } else {
                /* If the engine already exists, simply add the appid to the assistant list */