Fix crash when parsing icon info from wgt archive 11/130811/2
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 24 May 2017 05:38:17 +0000 (14:38 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Wed, 24 May 2017 05:47:39 +0000 (14:47 +0900)
Change-Id: Ifa4866a495af0764be72eb4e5d68d016642b931f
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/lib/wgt_archive_info.cc

index eb508e1..205ba5f 100644 (file)
@@ -164,7 +164,7 @@ std::string GetIconInfo(const wgt::parse::WidgetConfigParser& parser) {
   auto icons_info =
       std::static_pointer_cast<const wgt::parse::ApplicationIconsInfo>(
           parser.GetManifestData(wgt::parse::ApplicationIconsInfo::Key()));
-  if (!icons_info)
+  if (!icons_info || icons_info->icons().empty())
     return {};
 
   return std::string(icons_info->icons().front().path());