summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Anthony <johnanthony@lavabit.com>2012-08-04 19:07:17 +0100
committerJohn Anthony <johnanthony@lavabit.com>2012-08-04 19:07:17 +0100
commitcbcb6c8ef40470a3144465e92c0c83e3ac427e9a (patch)
tree460f24f264f6bcf30d968d624d29dd5530e0f031
parent68b7a45d092fe7480fbd5aaec861da1e79359b8c (diff)
downloadnyancat-cbcb6c8ef40470a3144465e92c0c83e3ac427e9a.tar.gz
nyancat-cbcb6c8ef40470a3144465e92c0c83e3ac427e9a.tar.bz2
nyancat-cbcb6c8ef40470a3144465e92c0c83e3ac427e9a.zip
Moved music restart hook to the loading function
-rw-r--r--nyan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nyan.c b/nyan.c
index d9ccd1f..e4bc59c 100644
--- a/nyan.c
+++ b/nyan.c
@@ -354,7 +354,6 @@ init(void) {
load_music();
Mix_PlayMusic(music, 0);
Mix_VolumeMusic(sound_volume);
- Mix_HookMusicFinished(restart_music);
}
/* Choose our image set */
@@ -450,6 +449,8 @@ load_music(void) {
}
if (!music)
printf("Unable to load Ogg file: %s\n", Mix_GetError());
+ else
+ Mix_HookMusicFinished(restart_music);
}
static void