aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-02 07:00:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-02 07:00:57 +0000
commit82573ee7419091e5ec87e2f4fa254c7a285781d6 (patch)
treef45ecc70171c05c92f6e2a2d232977c67ee17f75 /lib/CodeGen/CGBlocks.cpp
parente1bd4e6d7c5b13462f83245865f7d9e9b6ea8486 (diff)
Avoid crash when child iterator gives null result.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index e50b320a0c..ee17a862b1 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -111,7 +111,8 @@ static void CollectBlockDeclRefInfo(const Stmt *S,
CodeGenFunction::BlockInfo &Info) {
for (Stmt::const_child_iterator I = S->child_begin(), E = S->child_end();
I != E; ++I)
- CollectBlockDeclRefInfo(*I, Info);
+ if (*I)
+ CollectBlockDeclRefInfo(*I, Info);
if (const BlockDeclRefExpr *DE = dyn_cast<BlockDeclRefExpr>(S)) {
// FIXME: Handle enums.