[MPlayer-cvslog] r34672 - trunk/gui/cfg.c

ib subversion at mplayerhq.hu
Thu Feb 9 15:52:22 CET 2012


Author: ib
Date: Thu Feb  9 15:52:22 2012
New Revision: 34672

Log:
Check for playlist errors (path, but no file).

Modified:
   trunk/gui/cfg.c

Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c	Thu Feb  9 15:37:38 2012	(r34671)
+++ trunk/gui/cfg.c	Thu Feb  9 15:52:22 2012	(r34672)
@@ -284,9 +284,14 @@ void cfg_read(void)
             }
 
             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);


More information about the MPlayer-cvslog mailing list