From b3fe7cfc892f7d5978ad14eb81e9305fa9c14d13 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Apr 2007 17:23:11 +0000 Subject: Merged with trunk R1761 git-svn-id: svn://localhost/ardour2/branches/midi@1762 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_command.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libs/ardour/session_command.cc') 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(*regions[id], before, after); + } } else if (obj_T == typeid (AudioSource).name() || obj_T == typeid (MidiSource).name()) { if (sources.count(id)) return new MementoCommand(*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 ; } -- cgit v1.2.3