From cea26e7dbf539df8cb0fb598dc2e740d0dd26223 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 20 Jan 2008 19:59:28 +0000 Subject: [PATCH] Fix for a possible NRE exception when constructing a new AudioContext. --- Source/OpenTK/OpenAL/AudioContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/OpenAL/AudioContext.cs b/Source/OpenTK/OpenAL/AudioContext.cs index 09d0c9e4..dc2c1778 100644 --- a/Source/OpenTK/OpenAL/AudioContext.cs +++ b/Source/OpenTK/OpenAL/AudioContext.cs @@ -52,7 +52,7 @@ namespace OpenTK.Audio /// Constructs a new AudioContext, using the default audio device. /// Occurs when no audio devices are available. - 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