diff --git a/player/external_files.c b/player/external_files.c index 996344405f..82b39464a1 100644 --- a/player/external_files.c +++ b/player/external_files.c @@ -47,7 +47,7 @@ static int test_ext(MPOpts *opts, bstr ext) static int test_cover_filename(bstr fname, char **cover_files) { - for (int n = 0; cover_files[n]; n++) { + for (int n = 0; cover_files && cover_files[n]; n++) { if (bstrcasecmp(bstr0(cover_files[n]), fname) == 0) { size_t size = n; while (cover_files[++size]);