Parcourir la source

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 il y a 13 ans
Parent
commit
cf5ed6cd49
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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");
 		f = OSBasics::open(fileName.c_str(), "rb");
 		if (!f)
 		if (!f)
 			soundError("LoadWav: Could not load wav from " + fileName);
 			soundError("LoadWav: Could not load wav from " + fileName);
+			return buffer;
 		
 		
 		// buffers
 		// buffers
 		char magic[5];
 		char magic[5];