Fix scope in 4c077010a
authorRobin Gareus <robin@gareus.org>
Wed, 30 Aug 2017 16:01:17 +0000 (18:01 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 30 Aug 2017 16:01:17 +0000 (18:01 +0200)
gtk2_ardour/template_dialog.cc

index 65fa30d58bea065933edb8f2e93095fed238fe72..a5bbcd4089cd20397b135eed2dcba22f2c680a2c 100644 (file)
@@ -434,10 +434,9 @@ TemplateManager::save_template_desc ()
                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);
        }
 
-       tree.root()->add_child_nocopy (*desc);
-
        if (!tree.write ()) {
                error << string_compose(X_("Could not write to template file \"%1\"."), file_path) << endmsg;
                return;