Skip to content

Commit 5f72c1d

Browse files
committed
Fix a crash
1 parent 447030e commit 5f72c1d

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.2.3
2+
- Fix a crash when an invalid directory exists
3+
14
# 1.2.2
25
- Fix a crash
36

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mac": "2.2074",
77
"ios": "2.2074"
88
},
9-
"version": "v1.2.2",
9+
"version": "v1.2.3",
1010
"id": "alphalaneous.editorsounds",
1111
"name": "Editor Sounds",
1212
"developer": "Alphalaneous",

src/SoundEvent.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ SoundEvent SoundEvent::create(std::string soundName, OnSoundEvent onEvent, Sound
2727
if (Mod::get()->getSettingValue<bool>("enable-custom-sounds")) {
2828
soundPath = Mod::get()->getSettingValue<std::filesystem::path>("custom-sound-path");
2929
}
30-
else {
30+
31+
if (soundPath.empty() || !std::filesystem::exists(soundPath)) {
3132
soundPath = Mod::get()->getResourcesDir();
3233
}
3334

src/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <Geode/modify/EditButtonBar.hpp>
55
#include <Geode/modify/EditorPauseLayer.hpp>
66
#include "CustomKeybinds.hpp"
7-
#include "Geode/loader/Log.hpp"
87
#include "SoundHandler.hpp"
98
#include "HijackCallback.hpp"
109

0 commit comments

Comments
 (0)