AudioManager: if alc.openDevice() returns null, don't call alc.createContext() to avoid a SIGNAL 11 crash

This commit is contained in:
Josh Tynjala
2025-01-24 09:46:56 -08:00
parent e0c734d8fe
commit 7255873893

View File

@@ -34,10 +34,13 @@ class AudioManager
var alc = context.openal; var alc = context.openal;
var device = alc.openDevice(); var device = alc.openDevice();
if (device != null)
{
var ctx = alc.createContext(device); var ctx = alc.createContext(device);
alc.makeContextCurrent(ctx); alc.makeContextCurrent(ctx);
alc.processContext(ctx); alc.processContext(ctx);
} }
}
#end #end
} }