diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2009-02-28 23:45:02 +0000 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-02-28 23:51:12 +0000 |
commit | 8fc9b19cb314329487a62a15c523e9778298f1d5 (patch) | |
tree | 1dc0554733a81359255b913f60ed496431701d6d | |
parent | 116b38c972942ccbbb8dae5dc0181da98096a0ce (diff) |
Don't assume that device reservation is enabled.
In the case when the alsa 'device' is not a physical card, it wont have an index and thus
the reservation name will be NULL and therefore we will not initialise the reservation system.
Fixes #498
-rw-r--r-- | src/modules/alsa/alsa-sink.c | 2 | ||||
-rw-r--r-- | src/modules/alsa/alsa-source.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 0aef1bd5..708e020c 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -148,7 +148,7 @@ static void reserve_update(struct userdata *u) { const char *description; pa_assert(u); - if (!u->sink) + if (!u->sink || !u->reserve) return; if ((description = pa_proplist_gets(u->sink->proplist, PA_PROP_DEVICE_DESCRIPTION))) diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index 671df3fe..4321c7ff 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -146,7 +146,7 @@ static void reserve_update(struct userdata *u) { const char *description; pa_assert(u); - if (!u->source) + if (!u->source || !u->reserve) return; if ((description = pa_proplist_gets(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION))) |