diff --git a/useractions.cpp b/useractions.cpp
index f79fe15700..305930bd26 100755
--- a/useractions.cpp
+++ b/useractions.cpp
@@ -57,6 +57,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include
#include
@@ -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 allActivitiesGroup;
if (!allActivitiesGroup) {
allActivitiesGroup = new QActionGroup(m_activityMenu);
}