summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpphoverhandler.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2009-10-26 10:33:32 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2009-10-26 10:35:10 +0100
commit3e953b03238ffa15de3c04dec22cb64e1253145b (patch)
treebb846420fe7b79c2a1b961f191b2fb47853bb59f /src/plugins/cppeditor/cpphoverhandler.cpp
parentdc8318853a4059a4e841e976b137e1d6b963cb4f (diff)
downloadqt-creator-3e953b03238ffa15de3c04dec22cb64e1253145b.tar.gz
Check for null scope when hovering.
Fixes a segfault when hovering over QtCleanUpFunction in qcoreapplication.h. Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/plugins/cppeditor/cpphoverhandler.cpp')
-rw-r--r--src/plugins/cppeditor/cpphoverhandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index 508eec2854..ff671da25a 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -337,7 +337,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
firstType = resolve(firstType, typeOfExpression.lookupContext(),
&resolvedSymbol, &resolvedName);
- if (resolvedSymbol && resolvedSymbol->scope()->isClassScope()) {
+ if (resolvedSymbol && resolvedSymbol->scope()
+ && resolvedSymbol->scope()->isClassScope()) {
Class *enclosingClass = resolvedSymbol->scope()->owner()->asClass();
if (Identifier *id = enclosingClass->identifier()) {
if (id->isEqualTo(resolvedSymbol->identifier()))