Skip to content

Commit 8b1699e

Browse files
committed
Ensure target jvm won't crash
Changes to be committed: modified: src/perfj/c/perf-map-file.c
1 parent 9e9f5e8 commit 8b1699e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/perfj/c/perf-map-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ int perf_map_close(FILE *fp) {
4242
}
4343

4444
void perf_map_write_entry(FILE *method_file, const void* code_addr, unsigned int code_size, const char* entry) {
45-
if (method_file)
45+
if (method_file && entry)
4646
fprintf(method_file, "%lx %x %s\n", (unsigned long) code_addr, code_size, entry);
4747
}

0 commit comments

Comments
 (0)