QmlJSEditor: Fix crash when triggering context menu

Regression introduced with 3da9c89981.

Change-Id: Ia0ede1b46b7bc8cbce8b55335b3a548e7f8d384d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-02-21 11:47:01 +01:00
parent 84e17dd0f8
commit e7663d0cce
4 changed files with 12 additions and 4 deletions

View File

@@ -238,6 +238,12 @@ Utils::JsonSchemaManager *QmlJSEditorPlugin::jsonManager()
return &m_instance->d->m_jsonManager;
}
QuickToolBar *QmlJSEditorPlugin::quickToolBar()
{
QTC_ASSERT(m_instance && m_instance->d, return new QuickToolBar());
return &m_instance->d->m_quickToolBar;
}
void QmlJSEditorPluginPrivate::findUsages()
{
if (QmlJSEditorWidget *editor = qobject_cast<QmlJSEditorWidget*>(EditorManager::currentEditor()->widget()))