mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
Merge pull request #309 from rg3/ogg_enable_fix
Fix segfault in OGG_PlayTrack when ogg_enable is set to zero
This commit is contained in:
commit
d429c91270
1 changed files with 5 additions and 5 deletions
|
@ -555,6 +555,11 @@ OGG_Cmd(void)
|
|||
void
|
||||
OGG_Init(void)
|
||||
{
|
||||
// Cvars
|
||||
cd_shuffle = Cvar_Get("cd_shuffle", "0", CVAR_ARCHIVE);
|
||||
ogg_ignoretrack0 = Cvar_Get("ogg_ignoretrack0", "0", CVAR_ARCHIVE);
|
||||
ogg_volume = Cvar_Get("ogg_volume", "0.7", CVAR_ARCHIVE);
|
||||
|
||||
cvar_t *ogg_enabled = Cvar_Get("ogg_enable", "1", CVAR_ARCHIVE);
|
||||
|
||||
if (ogg_enabled->value != 1)
|
||||
|
@ -562,11 +567,6 @@ OGG_Init(void)
|
|||
return;
|
||||
}
|
||||
|
||||
// Cvars
|
||||
cd_shuffle = Cvar_Get("cd_shuffle", "0", CVAR_ARCHIVE);
|
||||
ogg_ignoretrack0 = Cvar_Get("ogg_ignoretrack0", "0", CVAR_ARCHIVE);
|
||||
ogg_volume = Cvar_Get("ogg_volume", "0.7", CVAR_ARCHIVE);
|
||||
|
||||
// Commands
|
||||
Cmd_AddCommand("ogg", OGG_Cmd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue