[sldev] audio_update_wind() not protected against NULL gAudiop

Jason Giglio gigstaggart at gmail.com
Fri Aug 3 09:36:59 PDT 2007


Robin Cornelius wrote:
> 
> Hi Guys,
> 
> In the latest main stream source, 1.18.1.2 there is a bug that only 
> seems to show its head when you compile yourself on linux (anyway no 
> idea for windows)
> 
> Anyway if kAUDIO_ENABLE_WIND is defined then the function body of 
> audio_update_wind() in viewer.cpp:4202 is enabled and if like me you 
> have sound issues and have all 3 sound servers disabled in the start up 
> script you have a NULL gAudiop.
> 
> In the distributed viewer it does not crash this way, and I am not sure 
> when and how kAUDIO_ENABLE_WIND gets enabled but it did when i built a 
> linux debug build.
> 
> 
> a quick fix is to patch line viewer.cpp:4902
> 
> from
> 
> if (region)
> 
> to
> 
> if (region && gAudiop)
> 

I wouldn't do only that.  I put a patch on Jira that follows the 
existing conventions better, and also avoids running other dangerous 
audio functions when no subsystem is present.

An extra check in audio_update_wind wouldn't hurt, though.

http://jira.secondlife.com/browse/VWR-1987


More information about the SLDev mailing list