summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2009-08-15 06:00:46 +0300
committerTanu Kaskinen <tanuk@iki.fi>2009-08-15 06:00:46 +0300
commit31c544d8439edee56ecc641c07012042ab38bb80 (patch)
tree0f1ce6738e19015636adabfb5e09b0dde670247d /src
parent18f9f1b5d17c83280205083760edd4dccb37ed6a (diff)
dbusiface-card: Assert that the profiles list is empty if there's no active
profile.
Diffstat (limited to 'src')
-rw-r--r--src/modules/dbus/iface-card.c2
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);