Skip to content

Commit f7fb91e

Browse files
committed
fixup! fixup! bootstrap: check more metadata when loading the snapshot
1 parent 65725ef commit f7fb91e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ int LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
12401240
// snapshot, but we will skip it if --no-node-snapshot is specified.
12411241
const node::SnapshotData* read_data =
12421242
SnapshotBuilder::GetEmbeddedSnapshotData();
1243-
if (read_data->Check()) {
1243+
if (read_data != nullptr && read_data->Check()) {
12441244
// If we fail to read the embedded snapshot, treat it as if Node.js
12451245
// was built without one.
12461246
*snapshot_data_ptr = read_data;

0 commit comments

Comments
 (0)