mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
fix crash when alGetError fails
This commit is contained in:
@@ -69,7 +69,8 @@ openal_buffer::openal_buffer( std::string const &Filename ) :
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
id = null_resource;
|
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;
|
delete[] buf;
|
||||||
|
|||||||
Reference in New Issue
Block a user