Mercurial > mplayer.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
36153:affa86541a51 | 36154:319cbb4d0967 |
---|---|
355 return False; | 355 return False; |
356 | 356 |
357 file = mp_basename(what); | 357 file = mp_basename(what); |
358 path = strdup(what); | 358 path = strdup(what); |
359 | 359 |
360 if (!path) | |
361 return False; | |
362 | |
360 if (file > what) | 363 if (file > what) |
361 path[file - what - 1] = 0; | 364 path[file - what - 1] = 0; |
362 else | 365 else |
363 strcpy(path, "."); | 366 strcpy(path, "."); |
364 | 367 |