We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f99e18 commit 0b66d32Copy full SHA for 0b66d32
1 file changed
src/sound.cpp
@@ -841,6 +841,10 @@ static void play_sound_internal(const std::string& files,
841
842
std::string file = pick_one(files);
843
const auto filename = filesystem::get_binary_file_location("sounds", file);
844
+ if(!filename) {
845
+ ERR_AUDIO << "Could not locate sound file '" << file << "'.";
846
+ return;
847
+ }
848
const auto localized = filesystem::get_localized_path(filename.value_or(""));
849
std::string real_path = localized.value_or(filename.value());
850
0 commit comments