From d3d879ac07ac45a623365b4db28c3b120a7bbb25 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 9 Sep 2013 16:24:15 +0300 Subject: disable fadeout music actions if music disabled. --- src/soundmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp index c7328b78f..2a3f362b7 100644 --- a/src/soundmanager.cpp +++ b/src/soundmanager.cpp @@ -293,6 +293,9 @@ void SoundManager::fadeInMusic(const std::string &fileName, const int ms) void SoundManager::fadeOutMusic(const int ms) { + if (!mPlayMusic) + return; + mCurrentMusicFile.clear(); if (!mInstalled) @@ -317,6 +320,9 @@ void SoundManager::fadeOutMusic(const int ms) void SoundManager::fadeOutAndPlayMusic(const std::string &fileName, const int ms) { + if (!mPlayMusic) + return; + mNextMusicFile = fileName; fadeOutMusic(ms); } -- cgit v1.2.3-70-g09d2