* abort() when out of memory

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3275 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-12-31 15:02:29 +00:00
parent 63844bf2b7
commit 06649908ff
1 changed files with 3 additions and 2 deletions

View File

@ -145,7 +145,8 @@ struct OggVorbisDecoderState* sound_CreateOggVorbisDecoder(PHYSFS_file* PHYSFS_f
struct OggVorbisDecoderState* decoder = malloc(sizeof(struct OggVorbisDecoderState));
if (decoder == NULL)
{
debug(LOG_ERROR, "sound_CreateOggVorbisDecoder: couldn't allocate memory\n");
debug(LOG_ERROR, "sound_CreateOggVorbisDecoder: Out of memory");
abort();
return NULL;
}
@ -156,7 +157,7 @@ struct OggVorbisDecoderState* sound_CreateOggVorbisDecoder(PHYSFS_file* PHYSFS_f
error = ov_open_callbacks(decoder, &decoder->oggVorbis_stream, NULL, 0, wz_oggVorbis_callbacks);
if (error < 0)
{
debug(LOG_ERROR, "sound_CreateOggVorbisDecoder: ov_open_callbacks failed with errorcode %d\n", error);
debug(LOG_ERROR, "sound_CreateOggVorbisDecoder: ov_open_callbacks failed with errorcode %d", error);
free(decoder);
return NULL;
}