summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/cppeditor/cpphoverhandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index 8f371bb287..e47fbe6581 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -158,8 +158,10 @@ static QString buildHelpId(const FullySpecifiedType &type,
scope = e->scope();
} else if (const NamedType *t = type->asNamedType()) {
name = t->name();
- } else if (const Declaration *d = symbol->asDeclaration()) {
- if (d->scope() && d->scope()->owner()->isEnum()) {
+ } else if (symbol && symbol->isDeclaration()) {
+ const Declaration *d = symbol->asDeclaration();
+
+ if (d->scope() && d->scope()->isEnumScope()) {
name = d->name();
scope = d->scope();
}