Skip to content

Commit

Permalink
AudioManager: if alc.openDevice() returns null, don't call alc.create…
Browse files Browse the repository at this point in the history
…Context() to avoid a SIGNAL 11 crash
  • Loading branch information
joshtynjala committed Jan 24, 2025
1 parent e0c734d commit 7255873
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lime/media/AudioManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ class AudioManager
var alc = context.openal;

var device = alc.openDevice();
var ctx = alc.createContext(device);
alc.makeContextCurrent(ctx);
alc.processContext(ctx);
if (device != null)
{
var ctx = alc.createContext(device);
alc.makeContextCurrent(ctx);
alc.processContext(ctx);
}
}
#end
}
Expand Down

0 comments on commit 7255873

Please sign in to comment.