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
This commit is contained in:
Colin Guthrie 2009-02-28 23:45:02 +00:00
parent 116b38c972
commit 8fc9b19cb3
2 changed files with 2 additions and 2 deletions

View file

@ -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)))