From 3a060a1680c7d931eb49678f494f57e4ce5abfba Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 30 Apr 2018 14:03:22 +0200 Subject: [PATCH] Delete old actions when setting new Noone should be calling this twice, but there's no need to leak memory if they do --- core/action.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/action.cpp b/core/action.cpp index d00d973a6..66e78330f 100644 --- a/core/action.cpp +++ b/core/action.cpp @@ -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; }