diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-15 06:00:46 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-15 06:00:46 +0300 |
commit | 31c544d8439edee56ecc641c07012042ab38bb80 (patch) | |
tree | 0f1ce6738e19015636adabfb5e09b0dde670247d /src/modules/dbus | |
parent | 18f9f1b5d17c83280205083760edd4dccb37ed6a (diff) |
dbusiface-card: Assert that the profiles list is empty if there's no active
profile.
Diffstat (limited to 'src/modules/dbus')
-rw-r--r-- | src/modules/dbus/iface-card.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/dbus/iface-card.c b/src/modules/dbus/iface-card.c index e3606c79..924bea9c 100644 --- a/src/modules/dbus/iface-card.c +++ b/src/modules/dbus/iface-card.c @@ -336,6 +336,8 @@ static void handle_set_active_profile(DBusConnection *conn, DBusMessage *msg, vo return; if (!c->active_profile) { + pa_assert(pa_hashmap_isempty(c->profiles)); + pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY, "The card %s has no profiles, and therefore there's no active profile either.", c->card->name); |