Skip to content
Snippets Groups Projects
Commit 4e35683e authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

C++: Fix null pointer dereference


Task-number: QTCREATORBUG-8698

Change-Id: If3181cb923ef7249945908c0610c16952262e881
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent a7d2e3c7
No related branches found
No related tags found
No related merge requests found
......@@ -79,5 +79,11 @@ bool Name::Compare::operator()(const Name *name, const Name *other) const
const Identifier *id = name->identifier();
const Identifier *otherId = other->identifier();
if (id == 0)
return otherId != 0;
if (otherId == 0)
return false;
return std::strcmp(id->chars(), otherId->chars()) < 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment