diff --git a/image.c b/image.c
index 3e8e393e386579f1f56a3998cfe9965bb73be36d..2e039fcd2cb9148039e4fbc20ecd44b5f7d487ab 100644
--- a/image.c
+++ b/image.c
@@ -153,7 +153,7 @@ struct ast_frame *ast_read_image(char *filename, const char *preflang, int forma
 				lseek(fd, 0, SEEK_SET);
 				f = found->read_image(fd,len); 
 			} else
-				ast_log(LOG_WARNING, "%s does not appear to be a %s file\n", buf, i->name);
+				ast_log(LOG_WARNING, "%s does not appear to be a %s file\n", buf, found->name);
 			close(fd);
 		} else
 			ast_log(LOG_WARNING, "Unable to open '%s': %s\n", buf, strerror(errno));