aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/DeclBase.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 0bdc6f54b7..6f8284458f 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -660,7 +660,7 @@ public:
/// \brief Determine whether this declaration context is equivalent
/// to the declaration context DC.
bool Equals(DeclContext *DC) {
- return this->getPrimaryContext() == DC->getPrimaryContext();
+ return DC && this->getPrimaryContext() == DC->getPrimaryContext();
}
/// \brief Determine whether this declaration context encloses the