diff --git a/src/node.cc b/src/node.cc index e3ebd36b0a6902..3eb3524d182d14 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1240,7 +1240,7 @@ int LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr, // snapshot, but we will skip it if --no-node-snapshot is specified. const node::SnapshotData* read_data = SnapshotBuilder::GetEmbeddedSnapshotData(); - if (read_data->Check()) { + if (read_data != nullptr && read_data->Check()) { // If we fail to read the embedded snapshot, treat it as if Node.js // was built without one. *snapshot_data_ptr = read_data;