diff gui/util/list.c @ 36154:319cbb4d0967

Check return value to avoid segmentation fault.
author ib
date Wed, 08 May 2013 12:37:28 +0000
parents df731f25759e
children 29c690aefc6f
line wrap: on
line diff
--- a/gui/util/list.c	Tue May 07 20:39:18 2013 +0000
+++ b/gui/util/list.c	Wed May 08 12:37:28 2013 +0000
@@ -357,6 +357,9 @@
     file = mp_basename(what);
     path = strdup(what);
 
+    if (!path)
+        return False;
+
     if (file > what)
         path[file - what - 1] = 0;
     else