diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp
index f239a01f544e8474b0be0abc328a8347ae251495..8983038649cdfb5e2060e5f4e5cc1bb843487949 100644
--- a/src/libs/utils/savedaction.cpp
+++ b/src/libs/utils/savedaction.cpp
@@ -421,7 +421,8 @@ void SavedAction::trigger(const QVariant &data)
 void SavedActionSet::insert(SavedAction *action, QWidget *widget)
 {
     m_list.append(action);
-    action->connectWidget(widget);
+    if (widget)
+        action->connectWidget(widget);
 }
 
 void SavedActionSet::apply(QSettings *settings)