forked from qt-creator/qt-creator
Copilot: fix crash on explicitly completion request
Change-Id: I6bdbc25063818399f1d2c81b9e8f7508f57a4b72 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -74,7 +74,7 @@ void CopilotPlugin::initialize()
|
|||||||
|
|
||||||
connect(requestAction, &QAction::triggered, this, [this] {
|
connect(requestAction, &QAction::triggered, this, [this] {
|
||||||
if (auto editor = TextEditor::TextEditorWidget::currentTextEditorWidget()) {
|
if (auto editor = TextEditor::TextEditorWidget::currentTextEditorWidget()) {
|
||||||
if (m_client->reachable())
|
if (m_client && m_client->reachable())
|
||||||
m_client->requestCompletions(editor);
|
m_client->requestCompletions(editor);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user