From 31c544d8439edee56ecc641c07012042ab38bb80 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 15 Aug 2009 06:00:46 +0300 Subject: dbusiface-card: Assert that the profiles list is empty if there's no active profile. --- src/modules/dbus/iface-card.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/modules/dbus') 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); -- cgit