dbusiface-card: Assert that the profiles list is empty if there's no active
authorTanu Kaskinen <tanuk@iki.fi>
Sat, 15 Aug 2009 03:00:46 +0000 (06:00 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 15 Aug 2009 03:00:46 +0000 (06:00 +0300)
profile.

src/modules/dbus/iface-card.c

index e3606c7..924bea9 100644 (file)
@@ -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);