Fix bug that caused crash when no sound was selected

This commit is contained in:
Admar Schoonen 2023-01-12 21:00:27 +01:00
parent ab2906b1a6
commit 8d38e81a95
1 changed files with 5 additions and 6 deletions

View File

@ -393,10 +393,9 @@ class MyClockWidget(FloatLayout):
if alarm_settings.alarm_activated == False:
return
if alarm_settings.sound_source == "":
return
if self.seconds_to_next_alarm < 0.1 and sound_process is None:
if self.seconds_to_next_alarm < 0.1:
print("Rise and shine baby!" + str(alarm_settings.sound_source))
if alarm_settings.sound_source != "" and sound_process is None:
sound_process = Process(target=play_sound, args=(alarm_settings.sound_source,))
sound_process.start()