Mercurial > audlegacy
changeset 2374:6c5d4d28cc6b trunk
[svn] - return NULL if vfs_fopen request failed
author | nenolod |
---|---|
date | Sat, 20 Jan 2007 16:55:37 -0800 |
parents | ad1d7687814c |
children | 063374a51105 |
files | ChangeLog src/audacious/vfs_buffered_file.c |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jan 20 04:48:41 2007 -0800 +++ b/ChangeLog Sat Jan 20 16:55:37 2007 -0800 @@ -1,3 +1,22 @@ +2007-01-20 12:48:41 +0000 Michael Farber <01mf02@gmail.com> + revision [3756] + made strings.h for existing strings.c, cleanups + trunk/src/audacious/input.c | 2 + trunk/src/audacious/output.c | 106 ++++++++++++++++------------------ + trunk/src/audacious/playlist.c | 2 + trunk/src/audacious/pluginenum.c | 1 + trunk/src/audacious/signals.c | 2 + trunk/src/audacious/strings.c | 33 ---------- + trunk/src/audacious/strings.h | 52 ++++++++++++++++ + trunk/src/audacious/ui_main.c | 1 + trunk/src/audacious/ui_playlist.c | 2 + trunk/src/audacious/ui_preferences.c | 1 + trunk/src/audacious/util.c | 9 -- + trunk/src/audacious/util.h | 18 ----- + trunk/src/audacious/widgets/textbox.c | 1 + 13 files changed, 116 insertions(+), 114 deletions(-) + + 2007-01-20 11:39:28 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [3754] - that should have been in vfs_fread
--- a/src/audacious/vfs_buffered_file.c Sat Jan 20 04:48:41 2007 -0800 +++ b/src/audacious/vfs_buffered_file.c Sat Jan 20 16:55:37 2007 -0800 @@ -177,6 +177,15 @@ fd->mem = g_malloc0(32768); fd->fd = vfs_fopen(uri, "rb"); + if (fd->fd == NULL) + { + g_free(fd->mem); + g_free(fd); + g_free(handle); + + return NULL; + } + sz = vfs_fread(fd->mem, 1, 32768, fd->fd); fd->buffer = vfs_buffer_new(fd->mem, sz);