dbusiface-card: Assert that the profiles list is empty if there's no active

profile.
This commit is contained in:
Tanu Kaskinen 2009-08-15 06:00:46 +03:00
parent 18f9f1b5d1
commit 31c544d843

View file

@ -336,6 +336,8 @@ static void handle_set_active_profile(DBusConnection *conn, DBusMessage *msg, vo
return; return;
if (!c->active_profile) { if (!c->active_profile) {
pa_assert(pa_hashmap_isempty(c->profiles));
pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY, 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.", "The card %s has no profiles, and therefore there's no active profile either.",
c->card->name); c->card->name);