mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-04 14:07:52 +00:00
Fixed null pointer exception on ALC.alcOpenDevice failure
This commit is contained in:
parent
f277e5607d
commit
08fc228d2c
1 changed files with 4 additions and 1 deletions
|
|
@ -178,7 +178,10 @@ public abstract class AL {
|
|||
ALC.create();
|
||||
|
||||
device = ALC.alcOpenDevice(deviceArguments);
|
||||
|
||||
if (device == null) {
|
||||
ALC.destroy();
|
||||
throw new LWJGLException("Could not open ALC device");
|
||||
}
|
||||
//check if doing default values or not
|
||||
if (contextFrequency == -1) {
|
||||
context = ALC.alcCreateContext(device.device, null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue