Commit 0504fdd0 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixes: Another possible crash

parent c842957a
......@@ -1119,7 +1119,8 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item)
// If the function doesn't return anything, automatically place the semicolon,
// unless we're doing a scope completion (then it might be function definition).
if (function->returnType()->isVoidType() && m_completionOperator != T_COLON_COLON) {
FullySpecifiedType retTy = function->returnType();
if (retTy && retTy->isVoidType() && m_completionOperator != T_COLON_COLON) {
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