mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
Guard against a hypothetical null pointer dereference
R=scheglov@google.com Review URL: https://codereview.chromium.org/2421473007 .
This commit is contained in:
parent
852ef37f71
commit
4942f5304a
1 changed files with 4 additions and 2 deletions
|
@ -225,8 +225,10 @@ class MemoryUseData {
|
|||
DartSdkManager manager = server.sdkManager;
|
||||
List<SdkDescription> descriptors = manager.sdkDescriptors;
|
||||
for (SdkDescription descriptor in descriptors) {
|
||||
_processAnalysisContext(
|
||||
manager.getSdk(descriptor, () => null).context, manager);
|
||||
DartSdk sdk = manager.getSdk(descriptor, () => null);
|
||||
if (sdk != null) {
|
||||
_processAnalysisContext(sdk.context, manager);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue