aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-07-07 12:51:18 -0700
committerChris Robinson <[email protected]>2009-07-07 12:51:18 -0700
commita8973514ba7cc1e454b714fa748826be286295b9 (patch)
tree60755a8ec3ff134c6ad83129d30e1e4c873bec71 /Alc/pulseaudio.c
parent0ac9e57d28cd0216d3b5cf8fe520a62235006a3a (diff)
Don't load functions if libpulse failed to open
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index ee63fc3b..874b5ca4 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -520,6 +520,7 @@ void alc_pulse_init(BackendFuncs *func_list) //{{{
#define LOAD_FUNC(x) do { \
p##x = GetProcAddress(pa_handle, #x); \
if(!(p##x)) { \
+ AL_PRINT("Could not load %s from libpulse-0.dll\n", #x); \
FreeLibrary(pa_handle); \
pa_handle = NULL; \
return; \
@@ -536,6 +537,7 @@ void alc_pulse_init(BackendFuncs *func_list) //{{{
#define LOAD_FUNC(x) do { \
p##x = dlsym(pa_handle, #x); \
if(!(p##x)) { \
+ AL_PRINT("Could not load %s from libpulse\n", #x); \
dlclose(pa_handle); \
pa_handle = NULL; \
return; \
@@ -548,6 +550,8 @@ void alc_pulse_init(BackendFuncs *func_list) //{{{
#define LOAD_FUNC(x) p##x = (x)
#endif
+ if(!pa_handle)
+ return;
LOAD_FUNC(pa_context_unref);
LOAD_FUNC(pa_sample_spec_valid);