Avoid crash in mario_delete if audio not init
This commit is contained in:
+3
-1
@@ -271,7 +271,9 @@ SM64_LIB_FN void sm64_mario_delete( int32_t marioId )
|
||||
struct GlobalState *globalState = ((struct MarioInstance *)s_mario_instance_pool.objects[ marioId ])->globalState;
|
||||
global_state_bind( globalState );
|
||||
|
||||
stop_sound(SOUND_MARIO_SNORING3, gMarioState->marioObj->header.gfx.cameraToObject);
|
||||
if ( is_audio_initialized ) {
|
||||
stop_sound(SOUND_MARIO_SNORING3, gMarioState->marioObj->header.gfx.cameraToObject);
|
||||
}
|
||||
|
||||
free( gMarioObject );
|
||||
free_area( gCurrentArea );
|
||||
|
||||
Reference in New Issue
Block a user