summaryrefslogtreecommitdiff
path: root/libs/ardour/session_command.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-29 17:23:11 +0000
committerDavid Robillard <d@drobilla.net>2007-04-29 17:23:11 +0000
commitb3fe7cfc892f7d5978ad14eb81e9305fa9c14d13 (patch)
tree4c6617c0397fb1ad3bef1f5fced35fb64b022ccb /libs/ardour/session_command.cc
parent490e18d80a22dda07bdf88dd440f7100897822de (diff)
Merged with trunk R1761
git-svn-id: svn://localhost/ardour2/branches/midi@1762 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_command.cc')
-rw-r--r--libs/ardour/session_command.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc
index aab60b294e..10f319ace8 100644
--- a/libs/ardour/session_command.cc
+++ b/libs/ardour/session_command.cc
@@ -81,8 +81,9 @@ Session::memento_command_factory(XMLNode *n)
/* create command */
string obj_T = n->property ("type_name")->value();
if (obj_T == typeid (AudioRegion).name() || obj_T == typeid (MidiRegion).name() || obj_T == typeid (Region).name()) {
- if (regions.count(id))
+ if (regions.count(id)) {
return new MementoCommand<Region>(*regions[id], before, after);
+ }
} else if (obj_T == typeid (AudioSource).name() || obj_T == typeid (MidiSource).name()) {
if (sources.count(id))
return new MementoCommand<Source>(*sources[id], before, after);
@@ -107,6 +108,7 @@ Session::memento_command_factory(XMLNode *n)
/* we failed */
error << string_compose (_("could not reconstitute MementoCommand from XMLNode. object type = %1 id = %2"), obj_T, id.to_s()) << endmsg;
+
return 0 ;
}