Avoid a crash when obtaining the configuration

This commit is contained in:
Pierre Pronchery 2012-02-25 04:06:58 +00:00
parent bd03b3389b
commit bff1c2d391

View File

@ -194,7 +194,8 @@ static int _oss_open(OSS * oss)
if(oss->fd >= 0)
close(oss->fd);
if((p = oss->helper->config_get(NULL, "oss", "mixer")) == NULL)
if((p = oss->helper->config_get(oss->helper->phone, "oss", "mixer"))
== NULL)
p = "/dev/mixer";
if((oss->fd = open(p, O_RDWR)) < 0)
{