AudioManager: if alc.openDevice() returns null, don't call alc.createContext() to avoid a SIGNAL 11 crash
This commit is contained in:
@@ -34,9 +34,12 @@ class AudioManager
|
|||||||
var alc = context.openal;
|
var alc = context.openal;
|
||||||
|
|
||||||
var device = alc.openDevice();
|
var device = alc.openDevice();
|
||||||
var ctx = alc.createContext(device);
|
if (device != null)
|
||||||
alc.makeContextCurrent(ctx);
|
{
|
||||||
alc.processContext(ctx);
|
var ctx = alc.createContext(device);
|
||||||
|
alc.makeContextCurrent(ctx);
|
||||||
|
alc.processContext(ctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user