summaryrefslogtreecommitdiff
path: root/mysys/my_div.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_div.c')
-rw-r--r--mysys/my_div.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_div.c b/mysys/my_div.c
index 660b87e5ab4..44eb5392421 100644
--- a/mysys/my_div.c
+++ b/mysys/my_div.c
@@ -27,7 +27,7 @@
char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
- if ((uint) fd >= (uint) my_file_limit)
+ if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{