diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index ee2fe1de9ee..263211a5988 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4034,7 +4034,7 @@ void GdbEngine::handleDebugInfoLocation(const DebuggerResponse &response) { if (response.resultClass == ResultDone) { const QString debugInfoLocation = runParameters().debugInfoLocation; - if (QFile::exists(debugInfoLocation)) { + if (!debugInfoLocation.isEmpty() && QFile::exists(debugInfoLocation)) { const QString curDebugInfoLocations = response.consoleStreamOutput.split('"').value(1); QString cmd = "set debug-file-directory " + debugInfoLocation; if (!curDebugInfoLocations.isEmpty())