Add OOM exception handler
[platform/core/appfw/wgt-backend.git] / src / wgt / step / filesystem / step_wgt_patch_icons.cc
index 9eaa321..8bc647f 100644 (file)
@@ -83,6 +83,8 @@ common_installer::Step::Status StepWgtPatchIcons::process() {
         return Status::ICON_ERROR;
       }
       icon_x* icon = reinterpret_cast<icon_x*>(calloc(1, sizeof(icon_x)));
+      if (!icon)
+        return Status::ICON_ERROR;
       icon->text = strdup(icon_path.c_str());
       icon->lang = strdup(DEFAULT_LOCALE);
       app->icon = g_list_append(app->icon, icon);