Index: runtime/vm/clustered_snapshot.cc |
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc |
index abfb3458bfe5b94b3ebb492d30fde544158edd15..40e8987152ffd60ba89b584c7bb03b295b6e89ae 100644 |
--- a/runtime/vm/clustered_snapshot.cc |
+++ b/runtime/vm/clustered_snapshot.cc |
@@ -5479,10 +5479,10 @@ RawApiError* FullSnapshotReader::ReadVMSnapshot() { |
return error; |
} |
- if (instructions_buffer_ != NULL) { |
+ if (Snapshot::IncludesCode(kind_)) { |
+ ASSERT(instructions_buffer_ != NULL); |
thread_->isolate()->SetupInstructionsSnapshotPage(instructions_buffer_); |
- } |
- if (data_buffer_ != NULL) { |
+ ASSERT(data_buffer_ != NULL); |
thread_->isolate()->SetupDataSnapshotPage(data_buffer_); |
} |
@@ -5501,10 +5501,10 @@ RawApiError* FullSnapshotReader::ReadIsolateSnapshot() { |
return error; |
} |
- if (instructions_buffer_ != NULL) { |
+ if (Snapshot::IncludesCode(kind_)) { |
+ ASSERT(instructions_buffer_ != NULL); |
thread_->isolate()->SetupInstructionsSnapshotPage(instructions_buffer_); |
- } |
- if (data_buffer_ != NULL) { |
+ ASSERT(data_buffer_ != NULL); |
thread_->isolate()->SetupDataSnapshotPage(data_buffer_); |
} |