Просмотр исходного кода

Fixes behavior when WAV files aren't found.

Previously it'd just give an error message but not actually abort. Now it does the same as loadOGG does.
cib 13 лет назад
Родитель
Сommit
cf5ed6cd49
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      Core/Contents/Source/PolySound.cpp

+ 1 - 0
Core/Contents/Source/PolySound.cpp

@@ -441,6 +441,7 @@ ALuint Sound::loadWAV(const String& fileName) {
 		f = OSBasics::open(fileName.c_str(), "rb");
 		if (!f)
 			soundError("LoadWav: Could not load wav from " + fileName);
+			return buffer;
 		
 		// buffers
 		char magic[5];