Copilot: fix crash on explicitly completion request

Change-Id: I6bdbc25063818399f1d2c81b9e8f7508f57a4b72
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
David Schulz
2023-07-06 08:32:08 +02:00
parent 615a1e52d5
commit 86191221b8

View File

@@ -74,7 +74,7 @@ void CopilotPlugin::initialize()
connect(requestAction, &QAction::triggered, this, [this] {
if (auto editor = TextEditor::TextEditorWidget::currentTextEditorWidget()) {
if (m_client->reachable())
if (m_client && m_client->reachable())
m_client->requestCompletions(editor);
}
});