forked from qt-creator/qt-creator
C++: Fix crash in code completion.
Caused by a dangling pointer of a template instantiation which had been cloned into the wrong control. The fix is to remove that control and refer to the control of the bindings (which is the correct one). Change-Id: I951a60f2e613aae1e4ac901ce99c820212018709 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
6999e3c339
commit
8e18adc70f
@@ -621,7 +621,7 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
|
||||
targetCoN = targetContext.globalNamespace();
|
||||
UseMinimalNames q(targetCoN);
|
||||
env.enter(&q);
|
||||
Control *control = sourceContext.control().data();
|
||||
Control *control = sourceContext.bindings()->control().data();
|
||||
|
||||
// get return type start position and declarator info from declaration
|
||||
DeclaratorAST *declarator = 0;
|
||||
@@ -667,7 +667,7 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
|
||||
targetCoN = targetContext.globalNamespace();
|
||||
UseMinimalNames q(targetCoN);
|
||||
env.enter(&q);
|
||||
Control *control = sourceContext.control().data();
|
||||
Control *control = sourceContext.bindings()->control().data();
|
||||
Overview overview = overviewFromCurrentProjectStyle;
|
||||
|
||||
// make a easy to access list of the target parameter declarations
|
||||
|
||||
Reference in New Issue
Block a user