summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm_dump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 15b1b4a4a3..6548a705dc 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -972,9 +972,11 @@ rb_vm_bugreport(const void *ctx)
(((len = RSTRING_LEN(s)) > max_name_length) ? max_name_length : (int)len)
name = vm->progname;
- fprintf(stderr, "* Loaded script: %.*s\n",
- LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
- fprintf(stderr, "\n");
+ if (name) {
+ fprintf(stderr, "* Loaded script: %.*s\n",
+ LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
+ fprintf(stderr, "\n");
+ }
fprintf(stderr, "* Loaded features:\n\n");
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
name = RARRAY_AREF(vm->loaded_features, i);