diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-03-18 14:58:46 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-03-19 14:12:11 +0100 |
commit | 947207c8020f6de25077481538e2855dc643c55e (patch) | |
tree | 0f5a11d913545b3e0b032bc44a5da28299516438 /src/plugins/cppeditor/cppquickfix.cpp | |
parent | 7f61d11311187b45e1bff859cd097eab59342cc7 (diff) | |
download | qt-creator-947207c8020f6de25077481538e2855dc643c55e.tar.gz |
C++: Fix dangling IDocument* in CppCompletionAssistProcessor
Steps to reproduce the crash:
1. Open some long file, e.g. botan.cpp
2. Trigger completion and close editor immediately
The IDocument pointer was only used to reference the file name. Instead
of passing an IDocument* to the IAssistInterface, pass the file name.
Change-Id: Iafce9b818806a77968a10541114bc9b7c8665f11
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfix.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppquickfix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppquickfix.cpp b/src/plugins/cppeditor/cppquickfix.cpp index efe46a9515..4557a96aaa 100644 --- a/src/plugins/cppeditor/cppquickfix.cpp +++ b/src/plugins/cppeditor/cppquickfix.cpp @@ -74,7 +74,7 @@ const CppQuickFixAssistInterface *CppQuickFixOperation::assistInterface() const QString CppQuickFixOperation::fileName() const { - return m_interface->document()->fileName(); + return m_interface->fileName(); } void CppQuickFixFactory::matchingOperations(const QuickFixInterface &interface, QuickFixOperations &result) |