summaryrefslogtreecommitdiffstats
path: root/Alc/dsound.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r--Alc/dsound.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index ac172344..fe7a0b50 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -479,7 +479,7 @@ static BOOL CALLBACK DSoundEnumDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname,
void alcDSoundInit(BackendFuncs *FuncList)
{
- *FuncList = DSoundFuncs;
+ if(FuncList) *FuncList = DSoundFuncs;
#ifdef _WIN32
ds_handle = LoadLibraryA("dsound.dll");
@@ -522,14 +522,14 @@ void alcDSoundDeinit(void)
#ifdef _WIN32
if(ds_handle)
FreeLibrary(ds_handle);
- ds_handle = NULL;
#endif
+ ds_handle = NULL;
}
void alcDSoundProbe(int type)
{
- if(!ds_handle)
- return;
+ if(!ds_handle) alcDSoundInit(NULL);
+ if(!ds_handle) return;
if(type == DEVICE_PROBE)
AppendDeviceList(dsDevice);