Fix Description field in Tizen Manifest 44/34544/3
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 28 Jan 2015 17:07:41 +0000 (18:07 +0100)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Thu, 29 Jan 2015 10:44:42 +0000 (02:44 -0800)
This permits to avoid to have this

<label>(null)</label> instead of <label></label> in the manifest

Change-Id: Iddaedf33940358cd52590487f6a7c6febda809c1
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
src/common/step/step_generate_xml.cc

index d1f0472..812791f 100644 (file)
@@ -78,9 +78,12 @@ Step::Status StepGenerateXml::process() {
 
   xmlTextWriterWriteFormatElement(writer, BAD_CAST "label",
       "%s", BAD_CAST context_->manifest_data()->label->name);
-
-  xmlTextWriterWriteFormatElement(writer, BAD_CAST "description",
-      "%s", BAD_CAST context_->manifest_data()->description->name);
+  if ( context_->manifest_data()->description->name )
+    xmlTextWriterWriteFormatElement(writer, BAD_CAST "description",
+        "%s", BAD_CAST context_->manifest_data()->description->name);
+  else
+    xmlTextWriterWriteFormatElement(writer, BAD_CAST "description",
+        "%s", BAD_CAST "");
 
   // add ui-application element per ui application
   for (; ui != nullptr; ui = ui->next) {