fix dangeling allActivitiesGroup pointer crash

CCBUG: 334152

Forward port of d3fe2391f6b36398ac671fe3cadef667919cc0e5 from kde-workspace
This commit is contained in:
Thomas Lübking 2014-05-01 16:22:04 +02:00 committed by Martin Gräßlin
parent d6ea601005
commit 00bb767291

View file

@ -57,6 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QAction>
#include <QCheckBox>
#include <QtConcurrentRun>
#include <QPointer>
#include <QPushButton>
#include <KGlobalAccel>
@ -677,7 +678,7 @@ void UserActionsMenu::activityPopupAboutToShow()
QAction *action = m_activityMenu->addAction(i18n("&All Activities"));
action->setData(QString());
action->setCheckable(true);
static QActionGroup *allActivitiesGroup = NULL;
static QPointer<QActionGroup> allActivitiesGroup;
if (!allActivitiesGroup) {
allActivitiesGroup = new QActionGroup(m_activityMenu);
}