# HG changeset patch # User ib # Date 1368016648 0 # Node ID 319cbb4d09678cd3603457f05fb9906cb9717baf # Parent affa86541a51c12e0451cecca9cd098e0dd99d59 Check return value to avoid segmentation fault. diff -r affa86541a51 -r 319cbb4d0967 gui/util/list.c --- 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