forked from len0rd/rockbox
Fix possible negative fd in playlist.c
Change-Id: I59d88609ec3f20ec9f482a777396cd72be23a35b
This commit is contained in:
parent
02b940396b
commit
257ba1d2e0
1 changed files with 1 additions and 1 deletions
|
|
@ -3707,7 +3707,7 @@ int playlist_save(struct playlist_info* playlist, char *filename,
|
|||
if (!rename(path, tmp_buf))
|
||||
{
|
||||
fd = open_utf8(tmp_buf, O_RDONLY);
|
||||
if (fsamefile(fd, playlist->fd) > 0)
|
||||
if (fd >= 0 && fsamefile(fd, playlist->fd) > 0)
|
||||
{
|
||||
/* Replace the current playlist with the new one and update
|
||||
indices */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue