mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +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
|
@ -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