13
0

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
This commit is contained in:
Carl Hetherington 2012-06-25 21:19:21 +00:00
parent 49a32910c5
commit cc9ed077be

View File

@ -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);