fix nasty bug caused by incorrect checking of list contents

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@9433 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Ben Loftis 2011-04-26 15:20:56 +00:00
parent 72f9b8400e
commit 0dee6d6d75

View file

@ -320,7 +320,7 @@ AutomationList::write_pass_finished (double when)
{
//if fader is in Write, we need to put an automation point to mark the last place we rolled.
if ( (_state & Auto_Write) ) {
if ( nascent.back() && !nascent.back()->events.empty() ) {
if ( !nascent.empty() && !nascent.back()->events.empty() ) {
rt_add( when, nascent.back()->events.back()->value );
}
}