mirror of https://github.com/mpv-player/mpv
player/external_files: fix null deref when cover-art-whitelist is empty
This can happen when using --cover-art-whitelist-clr.
Fixes: d384a6b793
This commit is contained in:
parent
4c19df1ded
commit
151fa74806
|
@ -47,7 +47,7 @@ static int test_ext(MPOpts *opts, bstr ext)
|
||||||
|
|
||||||
static int test_cover_filename(bstr fname, char **cover_files)
|
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) {
|
if (bstrcasecmp(bstr0(cover_files[n]), fname) == 0) {
|
||||||
size_t size = n;
|
size_t size = n;
|
||||||
while (cover_files[++size]);
|
while (cover_files[++size]);
|
||||||
|
|
Loading…
Reference in New Issue