diff --git a/src/plugins/debugger/debuggerkitconfigwidget.cpp b/src/plugins/debugger/debuggerkitconfigwidget.cpp
index 8fbf67390a41d9867df37ce58836ca2cae726b39..a3e0b611d311bb094e7971f1f0109ba9aaf91cd0 100644
--- a/src/plugins/debugger/debuggerkitconfigwidget.cpp
+++ b/src/plugins/debugger/debuggerkitconfigwidget.cpp
@@ -647,6 +647,9 @@ void DebuggerItemManager::saveDebuggers()
 
 QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item)
 {
+    QTC_ASSERT(!item.command().isEmpty(), return QVariant());
+    QTC_ASSERT(!item.displayName().isEmpty(), return QVariant());
+    QTC_ASSERT(item.engineType() != NoEngineType, return QVariant());
     if (findByCommand(item.command()))
         return item.id();
 
@@ -661,9 +664,6 @@ void DebuggerItemManager::deregisterDebugger(const DebuggerItem &item)
 
 QVariant DebuggerItemManager::addDebugger(const DebuggerItem &item)
 {
-    QTC_ASSERT(!item.command().isEmpty(), return QVariant());
-    QTC_ASSERT(!item.displayName().isEmpty(), return QVariant());
-    QTC_ASSERT(item.engineType() != NoEngineType, return QVariant());
     QTC_ASSERT(item.id().isValid(), return QVariant());
     m_debuggers.append(item);
     m_model->addDebugger(item);