aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/oss.c')
-rw-r--r--Alc/backends/oss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c
index c7fc404c..9ca92410 100644
--- a/Alc/backends/oss.c
+++ b/Alc/backends/oss.c
@@ -104,7 +104,7 @@ static void ALCossListAppend(struct oss_device *list, char *handle, size_t hlen,
struct oss_device *p;
void *m;
size_t i;
- if (list == NULL || handle == NULL || path == NULL)
+ if (list == NULL || handle == NULL || path == NULL || plen == 0 || path[0] == '\0')
return;
/* skip the first item "OSS Default" */
p = list;
@@ -118,7 +118,7 @@ static void ALCossListAppend(struct oss_device *list, char *handle, size_t hlen,
plen = i;
}
#endif
- if (handle == NULL || hlen == 0 || *handle == '\0') {
+ if (handle == NULL || hlen == 0 || handle[0] == '\0') {
handle = path;
hlen = plen;
}