Mercurial > mplayer.hg
changeset 34584:500ea19f03eb
Check for playlist errors (path, but no file).
author | ib |
---|---|
date | Thu, 09 Feb 2012 14:52:22 +0000 |
parents | 8e4cafa03bd4 |
children | 60bf43f94f17 |
files | gui/cfg.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/cfg.c Thu Feb 09 14:37:38 2012 +0000 +++ b/gui/cfg.c Thu Feb 09 14:52:22 2012 +0000 @@ -284,9 +284,14 @@ } item->path = strdup(line); - fgetstr(line, sizeof(line), file); + + if (fgetstr(line, sizeof(line), file)) { item->name = strdup(line); listSet(gtkAddPlItem, item); + } else { + free(item->path); + free(item); + } } fclose(file);