Skip to content

Commit

Permalink
fixup! fixup! bootstrap: check more metadata when loading the snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Aug 5, 2022
1 parent 65725ef commit f7fb91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Expand Up @@ -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;
Expand Down

0 comments on commit f7fb91e

Please sign in to comment.