Skip to content

Commit b3f1fd9

Browse files
committed
Add check against NULL
1 parent 3d36113 commit b3f1fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IDE/Formatting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,7 @@ class FormatWalker : public ASTWalker {
24852485
getIndentContextFrom(CaptureListExpr *CL,
24862486
SourceLoc ContextLoc = SourceLoc()) {
24872487
AbstractClosureExpr *CE = CL->getClosureBody();
2488-
BraceStmt *BS = CE->getBody();
2488+
BraceStmt *BS = CE ? CE->getBody() : NULL;
24892489
if (!CE || !BS)
24902490
return None;
24912491

0 commit comments

Comments
 (0)