diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp
index b9e1c83135e38b6ebea8fa78312f176c00ce1165..8a3490107d5de300827a20ab5d0bf37f81153edf 100644
--- a/src/plugins/debugger/gdb/classicgdbengine.cpp
+++ b/src/plugins/debugger/gdb/classicgdbengine.cpp
@@ -708,7 +708,9 @@ bool GdbEngine::checkDebuggingHelpersClassic()
     const QString msg = tr("The debugging helper library was not found at %1.")
             .arg(loc);
     showMessage(msg);
-    showQtDumperLibraryWarning(msg); // This might build the library.
+    // This can happen for remote debugging.
+    if (!locations.isEmpty())
+        showQtDumperLibraryWarning(msg); // This might build the library.
     return QFileInfo(lib).exists();
 }