diff options
author | Chris Robinson <[email protected]> | 2016-04-30 17:14:55 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-04-30 17:20:25 -0700 |
commit | d1e98c36d375433cb11a7a74ce20c968491773aa (patch) | |
tree | eec1dfa5752432e2633c22576118814deec65858 /Alc | |
parent | 3556da0d022dca2a65ed7d1fe736855fac728c95 (diff) |
Don't crash when there's no backend to probe
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); |