Commit 86f4848f authored by Milian Wolff's avatar Milian Wolff
Browse files

fix crash in signature assistant when view gets closed before parse update

the question remains whether we might not want to delete the assistant before
the view anyways, similar to how we do it with the rename assistant

BUG: 298676
parent 7f7e4032
......@@ -205,7 +205,7 @@ void AdaptDefinitionSignatureAssistant::parseJobFinished(KDevelop::ParseJob* job
DUChainReadLocker lock;
Declaration *functionDecl = getDeclarationAtCursor(SimpleCursor(m_view->cursorPosition()), m_document);
Declaration *functionDecl = getDeclarationAtCursor(SimpleCursor(m_view.data()->cursorPosition()), m_document);
if (!functionDecl || functionDecl->identifier() != m_declarationName)
return;
DUContext *functionCtxt = DUChainUtils::getFunctionContext(functionDecl);
......
......@@ -64,7 +64,7 @@ class AdaptDefinitionSignatureAssistant : public IAssistant {
//old signature of the _other_side
Signature m_oldSignature;
KUrl m_document;
KTextEditor::View *m_view;
QWeakPointer<KTextEditor::View> m_view;
private slots:
void parseJobFinished(KDevelop::ParseJob*);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment