[Fix] Another seg fault with music system when disabled.

This commit is contained in:
Allanis 2013-06-22 15:37:56 +01:00
parent 38d1f8e65e
commit 883523e1e5

View File

@ -409,6 +409,8 @@ int lua_loadMusic(lua_State* L, int read_only) {
} }
int music_choose(char* situation) { int music_choose(char* situation) {
if(sound_lock == NULL) return 0;
lua_getglobal(music_lua, "choose"); lua_getglobal(music_lua, "choose");
lua_pushstring(music_lua, situation); lua_pushstring(music_lua, situation);
if(lua_pcall(music_lua, 1, 0, 0)) { if(lua_pcall(music_lua, 1, 0, 0)) {