| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index 22e23911615cecd9d72dcd545b018d2983ff3b1b..50c30ce8362e632f1cad8107eb37a031f6c4836c 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -1581,7 +1581,9 @@ Dart_CreateSnapshot(uint8_t** vm_isolate_snapshot_buffer,
|
| isolate_snapshot_buffer, ApiReallocate,
|
| NULL /* instructions_writer */);
|
| writer.WriteFullSnapshot();
|
| - *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
|
| + if (vm_isolate_snapshot_buffer != NULL) {
|
| + *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
|
| + }
|
| *isolate_snapshot_size = writer.IsolateSnapshotSize();
|
| return Api::Success();
|
| }
|
|
|