#include "common/utils/manifest_util.h"
+#include <manifest_parser/utils/logging.h>
#include <pkgmgr/pkgmgr_parser.h>
#include <pkgmgr-info.h>
#include <tzplatform_config.h>
return PMINFO_R_ERROR;
}
- icon_x* icon = static_cast<icon_x*>(calloc(1, sizeof(icon_x)));
- if (!icon) {
- free(application);
- return PMINFO_R_ERROR;
- }
-
char* icon_text = nullptr;
- if (pkgmgrinfo_appinfo_get_icon(handle, &icon_text)) {
- free(application);
- free(icon);
- return PMINFO_R_ERROR;
- }
+ if (pkgmgrinfo_appinfo_get_icon(handle, &icon_text))
+ LOG(INFO) << "No Icon for " << app_id;
if (!mfx->root_path) {
char *root_path = nullptr;
if (pkgmgrinfo_appinfo_get_root_path(handle, &root_path)) {
free(application);
- free(icon);
return PMINFO_R_ERROR;
}
mfx->root_path = strdup(root_path);
}
application->appid = strdup(app_id);
- icon->text = strdup(icon_text);
- application->icon = g_list_append(application->icon, icon);
+ if (icon_text) {
+ icon_x* icon = static_cast<icon_x*>(calloc(1, sizeof(icon_x)));
+ if (!icon) {
+ free(application);
+ return PMINFO_R_ERROR;
+ }
+ icon->text = strdup(icon_text);
+ application->icon = g_list_append(application->icon, icon);
+ }
mfx->application = g_list_append(mfx->application, application);
return PMINFO_R_OK;