aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/ASTLocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Index/ASTLocation.cpp')
-rw-r--r--lib/Index/ASTLocation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Index/ASTLocation.cpp b/lib/Index/ASTLocation.cpp
index 84d79363ef..e869707f4d 100644
--- a/lib/Index/ASTLocation.cpp
+++ b/lib/Index/ASTLocation.cpp
@@ -51,8 +51,9 @@ static bool isContainedInStatement(Stmt *Node, Stmt *Parent) {
for (Stmt::child_iterator
I = Parent->child_begin(), E = Parent->child_end(); I != E; ++I) {
- if (isContainedInStatement(Node, *I))
- return true;
+ if (*I)
+ if (isContainedInStatement(Node, *I))
+ return true;
}
return false;