Skip to content

Commit

Permalink
fix: check that music stream is valid before attempting to stop it
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Jun 20, 2024
1 parent 9fc2329 commit 6b44c64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sk_scene_loading.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void sk_scene_loading_update(sk_state *s) {
s->curr_scene.kind = SK_SCENE_KIND_GAMEPLAY;
s->curr_scene.update = sk_scene_gameplay_update;
s->curr_scene.draw = sk_scene_gameplay_draw;
StopMusicStream(s->menu_music);
if (IsMusicReady(s->menu_music)) StopMusicStream(s->menu_music);
sk_player_load(&s->player);
sk_map_load(&s->map);
SetExitKey(KEY_ESCAPE);
Expand Down

0 comments on commit 6b44c64

Please sign in to comment.