diff options
author | Carl Hetherington <carl@carlh.net> | 2012-06-25 21:19:21 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-06-25 21:19:21 +0000 |
commit | cc9ed077be02bc7102807aaa791076da0d87cd1f (patch) | |
tree | 60d25dd8d6484f37a9629b46fa2d9bf95fecf75b /libs/pbd/pbd | |
parent | 49a32910c5506ec28f522e2bd2317c64520e8be9 (diff) |
Patch from johan_mattsson_m to be more graceful if there
is an undo record which references a non-existant
object; this shouldn't happen, of course, but there was
a bug in some early betas which made it occur (#4920).
git-svn-id: svn://localhost/ardour2/branches/3.0@12930 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r-- | libs/pbd/pbd/sequence_property.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index 3aeb83ce4e..b9d59724dd 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -32,6 +32,7 @@ #include "pbd/property_basics.h" #include "pbd/property_list.h" #include "pbd/stateful_diff_command.h" +#include "pbd/error.h" namespace PBD { @@ -199,9 +200,10 @@ class SequenceProperty : public PropertyBase for (XMLNodeList::const_iterator j = grandchildren.begin(); j != grandchildren.end(); ++j) { typename Container::value_type v = get_content_from_xml (**j); - assert (v); - - if ((*j)->name() == "Add") { + + if (!v) { + warning << "undo transaction references an unknown object" << endmsg; + } else if ((*j)->name() == "Add") { p->_changes.added.insert (v); } else if ((*j)->name() == "Remove") { p->_changes.removed.insert (v); |