Log if we fail to load default samples

This commit is contained in:
Henrik Rydgård committed 2023-07-16 14:25:46 +02:00
1 parent df104c66a8
commit 18fbe7afe8
1 file changed
+5 -2
+5 -2
View File
@@ -481,8 +481,11 @@ void SoundEffectMixer::LoadDefaultSample(UI::UISound sound) {
default:
return;
}
samples_[(size_t)sound] = std::unique_ptr<Sample>(Sample::Load(filename));
Sample *sample = Sample::Load(filename);
if (!sample) {
ERROR_LOG(SYSTEM, "Failed to load the default sample for UI sound %d", (int)sound);
}
samples_[(size_t)sound] = std::unique_ptr<Sample>(sample);
}
void SoundEffectMixer::LoadSamples() {