diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp index 8b425c8d1c0..53dfc5ecf31 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.cpp +++ b/src/plugins/qmljseditor/qmljseditordocument.cpp @@ -765,7 +765,7 @@ void QmlJSEditorDocumentPrivate::settingsChanged() m_qmllsStatus.qmllsPath = newQmlls; if (newQmlls.isEmpty()) { qCDebug(qmllsLog) << "disabling qmlls for" << q->filePath(); - if (Client *client = LanguageClientManager::clientForDocument(q)) { + if (LanguageClientManager::clientForDocument(q) != nullptr) { qCDebug(qmllsLog) << "deactivating " << q->filePath() << "in qmlls" << newQmlls; LanguageClientManager::openDocumentWithClient(q, nullptr); } else