diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-30 17:45:14 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-30 17:45:34 +0200 |
commit | 4c077010ad0fcb22b1cfd105c044402106207b19 (patch) | |
tree | f8ebec58a3fcf14e5fe6d5a0feb7ad3fb48674b2 /gtk2_ardour/template_dialog.cc | |
parent | 1f6c54a2f053caa8afec70f2acffdb7f7d73f09f (diff) |
Don't create empty description nodes.
Other places e.g. Route::save_as_template(), Session::save_template()
don't to that either.
Diffstat (limited to 'gtk2_ardour/template_dialog.cc')
-rw-r--r-- | gtk2_ardour/template_dialog.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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); |