summaryrefslogtreecommitdiff
path: root/src/sliceitoff/sfx
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-27 02:20:46 +0300
committerViljami Ilola <+@hix.fi>2024-04-27 02:20:46 +0300
commitd73fe4bb20e544443476ebb4c9fc593fa0a8ad4a (patch)
tree9a0669819d4f18cf1a118f0755d78dd95959dc7c /src/sliceitoff/sfx
parentdb5967a52d9409842581276154a6fa9763a57a24 (diff)
fix tests
Diffstat (limited to 'src/sliceitoff/sfx')
-rw-r--r--src/sliceitoff/sfx/sfx.py3
1 files changed, 2 insertions, 1 deletions
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 """