QmlJSEditor: Avoid crash

Do not try to access project settings if there
is no project.
Amends 0b47768ba1.

Fixes: QTCREATORBUG-31658
Change-Id: I5948f2b148369de23b4292a52d775f7467c472d6
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2024-10-02 12:46:27 +02:00
parent c3515cb747
commit 257eb02f4b

View File

@@ -172,6 +172,8 @@ bool QmllsSettingsManager::useLatestQmlls() const
bool QmllsSettingsManager::useQmlls(Project* onProject) const
{
if (!onProject)
return m_useQmlls;
// check if disabled via project specific settings
ProjectSettings projectSettings{onProject};