Clang: Check for nullptr

Task-number: QTCREATORBUG-18087
Change-Id: Icf8100d84a415995a8d913bc776699c895882e97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-04-26 12:20:51 +02:00
parent f38f120031
commit 53b80e9b51

View File

@@ -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);