| Index: runtime/vm/profiler.cc
|
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
|
| index 24342d5c0da8980e6e64e63ac318822faeb87172..66818e3b6244dd757cc7d4922a16da7d3ede722c 100644
|
| --- a/runtime/vm/profiler.cc
|
| +++ b/runtime/vm/profiler.cc
|
| @@ -201,6 +201,10 @@ void ProfilerManager::ResizeIsolates(intptr_t new_capacity) {
|
|
|
|
|
| void ProfilerManager::AddIsolate(Isolate* isolate) {
|
| + if (isolates_ == NULL) {
|
| + // We are shutting down.
|
| + return;
|
| + }
|
| // Must be called with monitor_ locked.
|
| if (isolates_size_ == isolates_capacity_) {
|
| ResizeIsolates(isolates_capacity_ == 0 ? 16 : isolates_capacity_ * 2);
|
|
|