From d73fe4bb20e544443476ebb4c9fc593fa0a8ad4a Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sat, 27 Apr 2024 02:20:46 +0300 Subject: fix tests --- src/sliceitoff/sfx/sfx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sliceitoff/sfx/sfx.py') diff --git a/src/sliceitoff/sfx/sfx.py b/src/sliceitoff/sfx/sfx.py index 8f3371e..a72df0b 100644 --- a/src/sliceitoff/sfx/sfx.py +++ b/src/sliceitoff/sfx/sfx.py @@ -52,7 +52,8 @@ class Sfx: self.music_volume += 1 self.music_volume %= 11 settings.replace_value("music_volume", self.music_volume) - self.sound[self.bgm].set_volume(self.music_volume / 10) + if self.bgm: + self.sound[self.bgm].set_volume(self.music_volume / 10) def play(self, sample): """ Just plays named sample loaded from assets directory """ -- cgit v1.2.3