mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Avoid possible null pointer access.
This commit is contained in:
parent
0f61586438
commit
b3b8ff1a43
1 changed files with 4 additions and 1 deletions
|
@ -210,7 +210,10 @@ final class FormatVisitor : ASTVisitor
|
|||
{
|
||||
if (auto bd = functionBody.specifiedFunctionBody)
|
||||
{
|
||||
astInformation.funBodyLocations ~= bd.blockStatement.startLocation;
|
||||
if (bd.blockStatement)
|
||||
{
|
||||
astInformation.funBodyLocations ~= bd.blockStatement.startLocation;
|
||||
}
|
||||
}
|
||||
functionBody.accept(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue