diff --git a/src/funcs.c b/src/funcs.c
index 7fc0e5c..4641c8b 100644
--- a/src/funcs.c
+++ b/src/funcs.c
@@ -301,7 +301,7 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unu
protected int
file_reset(struct magic_set *ms)
{
- if (ms->mlist[0] == NULL) {
+ if (ms->mlist == NULL) {
file_error(ms, 0, "no magic files loaded");
return -1;
}