Index: preparser/preparser-process.cc |
diff --git a/preparser/preparser-process.cc b/preparser/preparser-process.cc |
index b0aeb81e2a4d801f7ed9579fccbc6c23a8f58add..368f63f6ce5d7149508df0ebf273ce9a639dcf75 100644 |
--- a/preparser/preparser-process.cc |
+++ b/preparser/preparser-process.cc |
@@ -200,12 +200,14 @@ void fail(v8::PreParserData* data, const char* message, ...) { |
vfprintf(stderr, message, args); |
va_end(args); |
fflush(stderr); |
- // Print preparser data to stdout. |
- uint32_t size = data->size(); |
- fprintf(stderr, "LOG: data size: %u\n", size); |
- if (!WriteBuffer(stdout, data->data(), size)) { |
- perror("ERROR: Writing data"); |
- fflush(stderr); |
+ if (data != NULL) { |
+ // Print preparser data to stdout. |
+ uint32_t size = data->size(); |
+ fprintf(stderr, "LOG: data size: %u\n", size); |
+ if (!WriteBuffer(stdout, data->data(), size)) { |
+ perror("ERROR: Writing data"); |
+ fflush(stderr); |
+ } |
} |
exit(EXIT_FAILURE); |
} |