Commit 8f556dac authored by Nedko Arnaudov's avatar Nedko Arnaudov
Browse files

Make audio_acquire() fail if audio_reservation_init() fails.

rd_acquire() is going to assert (or fail) anyway because connection will be NULL.
parent 9d352400
......@@ -71,8 +71,11 @@ SERVER_EXPORT bool audio_acquire(const char * device_name)
int ret;
// Open DBus connection first time
if (gReserveCount == 0)
audio_reservation_init();
if (gReserveCount == 0) {
if (audio_reservation_init() != 0) {
return false;
}
}
assert(gReserveCount < DEVICE_MAX);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment