diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp index 012b5a6bd0d..a5ea4fa0032 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp @@ -78,11 +78,8 @@ static AnalyzerStartParameters createQmlProfilerStartParameters(RunConfiguration sp.debuggee = rc->executable(); sp.debuggeeArgs = rc->commandLineArguments(); sp.displayName = rc->displayName(); + sp.analyzerPort = LocalQmlProfilerRunner::findFreePort(sp.analyzerHost); - quint16 localPort = LocalQmlProfilerRunner::findFreePort(sp.analyzerHost); - if (localPort == 0) - return sp; - sp.analyzerPort = localPort; return sp; }