summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--StarsEx/MusicTrack.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/StarsEx/MusicTrack.cpp b/StarsEx/MusicTrack.cpp
index 88e970e..01d7082 100644
--- a/StarsEx/MusicTrack.cpp
+++ b/StarsEx/MusicTrack.cpp
@@ -48,6 +48,9 @@ fade(0), fade_time(FADE_TIME)
if (name.contains(".ogg")) {
sound = Sound::CreateOggStream(name);
+ if (!sound)
+ return;
+
if (name.contains("-loop")) {
sound->SetFlags(Sound::STREAMED |
Sound::OGGVORBIS |