#6243: fix segfault when keyname() returns a NULL pointer.

Bug noted by Trundle, patched by Trundle and Jerry Chen.
2 files changed