changeset 36154:319cbb4d0967

Check return value to avoid segmentation fault.
author ib
date Wed, 08 May 2013 12:37:28 +0000
parents affa86541a51
children 29c690aefc6f
files gui/util/list.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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