diff options
author | David Robillard <d@drobilla.net> | 2008-01-19 03:49:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-01-19 03:49:52 +0000 |
commit | 4ca1fe7993adf63ea3f35958f63dd20ee546e7ae (patch) | |
tree | f773e6cf00e08a8260c2e2b28b8e16e28b39b887 /libs/ardour/session_command.cc | |
parent | f80fad313a21228f31201279cccaf555796c7eec (diff) |
Merge with trunk R2935.
git-svn-id: svn://localhost/ardour2/branches/3.0@2943 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_command.cc')
-rw-r--r-- | libs/ardour/session_command.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index 534f2ffe81..e8670e7199 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -90,7 +90,10 @@ Session::memento_command_factory(XMLNode *n) if (sources.count(id)) return new MementoCommand<Source>(*sources[id], before, after); } else if (obj_T == typeid (Location).name()) { - return new MementoCommand<Location>(*_locations.get_location_by_id(id), before, after); + Location* loc = _locations.get_location_by_id(id); + if (loc) { + return new MementoCommand<Location>(*loc, before, after); + } } else if (obj_T == typeid (Locations).name()) { return new MementoCommand<Locations>(_locations, before, after); } else if (obj_T == typeid (TempoMap).name()) { |