diff options
Diffstat (limited to 'src/demuxers/demux_mod.c')
-rw-r--r-- | src/demuxers/demux_mod.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index 9bb17a990..bffcf36d8 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -134,7 +134,11 @@ static int open_mod_file(demux_mod_t *this) { /* Get size and create buffer */ this->filesize = this->input->get_length(this->input); this->buffer = (char *)malloc(this->filesize); - + if(!this->buffer) { + xine_log(this->stream->xine, XINE_LOG_PLUGIN, "modplug - allocation failure\n"); + return 0; + } + /* Seek to beginning */ this->input->seek(this->input, 0, SEEK_SET); |