Delete old actions when setting new

Noone should be calling this twice, but there's no need to leak memory if they do
This commit is contained in:
Albert Astals Cid 2018-04-30 14:03:22 +02:00
parent 1de0f5465b
commit 3a060a1680

View file

@ -72,6 +72,7 @@ QVector< Action * > Action::nextActions() const
void Action::setNextActions( const QVector< Action * > &actions )
{
Q_D( Action );
qDeleteAll( d->m_nextActions );
d->m_nextActions = actions;
}