Commit ad560bf0 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CPlusPlus: Avoid nullptr access

Task-number: QTCREATORBUG-18903
Change-Id: I852b5de453d44c16adffd44c89900cfb8c3cc522
Reviewed-by: default avatarPrzemyslaw Gorszkowski <>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <>
parent f439183c
......@@ -106,7 +106,11 @@ Declaration::Declaration(Clone *clone, Subst *subst, Declaration *original)
, _initializer(clone->stringLiteral(original->_initializer))
const char* nameId = nullptr;
if (const Identifier* identifier = name()->identifier())
const Name *theName = name();
if (!theName)
if (const Identifier* identifier = theName->identifier())
nameId = identifier->chars();
Markdown is supported
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