Fix for a possible NRE exception when constructing a new AudioContext.

This commit is contained in:
the_fiddler 2008-01-20 19:59:28 +00:00
parent a8353d7e33
commit cea26e7dbf

View file

@ -52,7 +52,7 @@ namespace OpenTK.Audio
/// <summary>Constructs a new AudioContext, using the default audio device.</summary>
/// <exception cref="NotSupportedException">Occurs when no audio devices are available.</exception>
public AudioContext() : this(available_devices[0], 0, 0, false, 0) { }
public AudioContext() : this(available_devices.Count > 0 ? available_devices[0] : "", 0, 0, false, 0) { }
#endregion