From: Robin Gareus Date: Wed, 30 Aug 2017 15:45:14 +0000 (+0200) Subject: Don't create empty description nodes. X-Git-Tag: 5.12~54 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=4c077010ad0fcb22b1cfd105c044402106207b19 Don't create empty description nodes. Other places e.g. Route::save_as_template(), Session::save_template() don't to that either. --- diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc index 6125c9330f..65fa30d58b 100644 --- a/gtk2_ardour/template_dialog.cc +++ b/gtk2_ardour/template_dialog.cc @@ -429,10 +429,12 @@ TemplateManager::save_template_desc () } tree.root()->remove_nodes_and_delete (X_("description")); - XMLNode* desc = new XMLNode (X_("description")); - XMLNode* dn = new XMLNode (X_("content"), desc_txt); - desc->add_child_nocopy (*dn); + if (!desc_txt.empty ()) { + XMLNode* desc = new XMLNode (X_("description")); + XMLNode* dn = new XMLNode (X_("content"), desc_txt); + desc->add_child_nocopy (*dn); + } tree.root()->add_child_nocopy (*desc);