mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
fix the calling of a null pointer (oops:)
This commit is contained in:
parent
ccb56eea39
commit
21e0e342a0
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ snd_noop (sfx_t *sfx)
|
|||
sfxbuffer_t *
|
||||
SND_CacheRetain (sfx_t *sfx)
|
||||
{
|
||||
return Cache_TryGet (&((sfxblock_t *) sfx)->cache);
|
||||
return Cache_TryGet (&((sfxblock_t *) sfx->data)->cache);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -114,12 +114,12 @@ SND_Load (sfx_t *sfx)
|
|||
Qread (file, buf, 4);
|
||||
Qseek (file, 0, SEEK_SET);
|
||||
if (strnequal ("OggS", buf, 4)) {
|
||||
free (name);
|
||||
Sys_DPrintf ("SND_Load: ogg file\n");
|
||||
SND_LoadOgg (file, sfx, realname);
|
||||
return;
|
||||
}
|
||||
if (strnequal ("RIFF", buf, 4)) {
|
||||
free (name);
|
||||
Sys_DPrintf ("SND_Load: wav file\n");
|
||||
SND_LoadWav (file, sfx, realname);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue