From e4005b5492b47cf7368df6463e6a69578dad8b5b Mon Sep 17 00:00:00 2001 From: cidoku Date: Mon, 27 Oct 2025 03:25:29 -0300 Subject: [PATCH] soundlist: dont crash on ini not found lol --- gameview.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gameview.py b/gameview.py index c6d8b7d..b839659 100644 --- a/gameview.py +++ b/gameview.py @@ -3690,7 +3690,7 @@ class GUI(QtGui.QWidget): self.mChatMessage = mChatMessage newSide = self.mChatMessage[SIDE] - canSlide = self.slideAvailable and not wasZoom and int(self.mChatMessage[EMOTE_MOD]) < 5 + canSlide = self.slideAvailable and not wasZoom and int(self.mChatMessage[EMOTE_MOD]) < 5 and self.mChatMessage[ANIM].strip() != "" if canSlide and self.mChatMessage[SLIDE] == "1" and self.slideLastPos and newSide != self.slideLastPos and newSide in ["def", "pro", "wit"]: self.startSlide(self.slideMap[self.slideLastPos][newSide]) @@ -4293,10 +4293,11 @@ class GUI(QtGui.QWidget): def populateSoundList(self): self.boxSounds.clear() self.boxSounds.addItem("Default") - with open("base/soundlist.ini") as f: - for sound in f.read().split("\n"): - if not sound: continue - self.boxSounds.addItem(sound.strip()) + if exists("base/soundlist.ini"): + with open("base/soundlist.ini") as f: + for sound in f.read().split("\n"): + if not sound: continue + self.boxSounds.addItem(sound.strip()) def playSfx(self):