Index: runtime/vm/pages.cc |
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc |
index 390f452e858c5fa21febe736d742b9bb0c03724b..7cee6df7868fbd11a1d689a0a364ba9ee601948a 100644 |
--- a/runtime/vm/pages.cc |
+++ b/runtime/vm/pages.cc |
@@ -535,6 +535,10 @@ void PageSpace::AbandonBumpAllocation() { |
void PageSpace::UpdateMaxCapacityLocked() { |
+ if (heap_ == NULL) { |
+ // Some unit tests. |
+ return; |
+ } |
ASSERT(heap_ != NULL); |
ASSERT(heap_->isolate() != NULL); |
Isolate* isolate = heap_->isolate(); |