aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-04-30 17:14:55 -0700
committerChris Robinson <[email protected]>2016-04-30 17:20:25 -0700
commitd1e98c36d375433cb11a7a74ce20c968491773aa (patch)
treeeec1dfa5752432e2633c22576118814deec65858 /Alc
parent3556da0d022dca2a65ed7d1fe736855fac728c95 (diff)
Don't crash when there's no backend to probe
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index ae678b19..ff7e6429 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1127,6 +1127,11 @@ static void alc_initconfig(void)
V0(factory,init)();
}
+ if(!PlaybackBackend.name)
+ WARN("No playback backend available!\n");
+ if(!CaptureBackend.name)
+ WARN("No capture backend available!\n");
+
if(ConfigValueStr(NULL, NULL, "excludefx", &str))
{
size_t len;
@@ -1240,9 +1245,9 @@ static void ProbeDevices(al_string *list, struct BackendInfo *backendinfo, enum
LockLists();
al_string_clear(list);
- if(!backendinfo->getFactory)
+ if(backendinfo->Probe)
backendinfo->Probe(type);
- else
+ else if(backendinfo->getFactory)
{
ALCbackendFactory *factory = backendinfo->getFactory();
V(factory,probe)(type);