export _AppControlImpl::FindAndStart()
[platform/framework/native/appfw.git] / src / app / FApp_ActiveWindowManager.cpp
index f06c428..1088790 100644 (file)
@@ -325,7 +325,11 @@ _ActiveWindowManager::GetActiveApp(AppId& appId)
        const unsigned int windowId = GetActiveWindow();
        const int processId = GetProcessId(windowId);
        char pkgname[255] = {0, };
-       aul_app_get_pkgname_bypid(processId, pkgname, 255);
+       if (aul_app_get_pkgname_bypid(processId, pkgname, 255) != AUL_R_OK)
+       {
+               SysSecureLog(NID_APP, "Failed to get the package name from pid=%x appId=%ls", processId, appId.GetPointer());
+               return E_SYSTEM;
+       }
 
        appId = _Aul::GetRealAppId(String(pkgname));