mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
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:
parent
1de0f5465b
commit
3a060a1680
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue