mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
fix crash when alGetError fails
This commit is contained in:
@@ -69,7 +69,8 @@ openal_buffer::openal_buffer( std::string const &Filename ) :
|
||||
}
|
||||
else {
|
||||
id = null_resource;
|
||||
ErrorLog("sound: failed to create AL buffer: " + std::string(alGetString(alGetError())));
|
||||
const char *str = alGetString(alGetError());
|
||||
ErrorLog("sound: failed to create AL buffer: " + (str != nullptr ? std::string(str) : ""));
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
|
||||
Reference in New Issue
Block a user