Skip to content

Commit 9fae178

Browse files
authored
Merge pull request #22843 from nkcsgexi/48290050
refactoring: add a defensive check for nullptr.
2 parents bdc2dfb + 28daeca commit 9fae178

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/IDE/Refactoring.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,8 +1909,7 @@ class ExpandableAssignTernaryExprInfo: public ExpandableTernaryExprInfo {
19091909
IfExpr *getIf() {
19101910
if (!Assign)
19111911
return nullptr;
1912-
1913-
return dyn_cast<IfExpr>(Assign->getSrc());
1912+
return dyn_cast_or_null<IfExpr>(Assign->getSrc());
19141913
}
19151914

19161915
SourceRange getNameRange() {

0 commit comments

Comments
 (0)