aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppeditor.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-04-26 12:20:51 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-04-26 10:56:36 +0000
commit53b80e9b51eb5352d1a46609c93b752609ed8100 (patch)
treefce9486c9cac649c6cfb19d4a141121e8dffc847 /src/plugins/cppeditor/cppeditor.cpp
parentf38f12003160dfeb047a7280e158f596549c5de2 (diff)
Clang: Check for nullptr
Task-number: QTCREATORBUG-18087 Change-Id: Icf8100d84a415995a8d913bc776699c895882e97 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppeditor.cpp')
-rw-r--r--src/plugins/cppeditor/cppeditor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index 19b261c42f..9b027d4135 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -542,7 +542,8 @@ void CppEditorWidget::renameSymbolUnderCursorClang()
{
using ClangBackEnd::SourceLocationsContainer;
- if (refactoringEngine()->isUsable()) {
+ ProjectPart *theProjectPart = projectPart();
+ if (refactoringEngine()->isUsable() && theProjectPart) {
d->m_useSelectionsUpdater.abortSchedule();
QPointer<CppEditorWidget> cppEditorWidget = this;
@@ -569,7 +570,7 @@ void CppEditorWidget::renameSymbolUnderCursorClang()
refactoringEngine()->startLocalRenaming(textCursor(),
textDocument()->filePath(),
document()->revision(),
- projectPart(),
+ theProjectPart,
std::move(renameSymbols));
viewport()->setCursor(Qt::BusyCursor);