diff options
author | Tanu Kaskinen <tanu.kaskinen@digia.com> | 2011-03-11 13:40:20 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@digia.com> | 2011-03-11 13:40:20 +0200 |
commit | 6c5e3af27591aa5ebbb332b80b6809cb320f7ae9 (patch) | |
tree | 1ae9229c2aa25b99ac2282cff034195904a1620d | |
parent | 973813485f171ec8db069926366790711a3c46d5 (diff) |
dbusiface-stream: Fix crash when there's no resampling used.
-rw-r--r-- | src/modules/dbus/iface-stream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/dbus/iface-stream.c b/src/modules/dbus/iface-stream.c index a9eb373f..6b46fa91 100644 --- a/src/modules/dbus/iface-stream.c +++ b/src/modules/dbus/iface-stream.c @@ -490,6 +490,9 @@ static void handle_get_resample_method(DBusConnection *conn, DBusMessage *msg, v else resample_method = pa_resample_method_to_string(s->source_output->actual_resample_method); + if (!resample_method) + resample_method = ""; + pa_dbus_send_basic_variant_reply(conn, msg, DBUS_TYPE_STRING, &resample_method); } @@ -560,6 +563,8 @@ static void handle_get_all(DBusConnection *conn, DBusMessage *msg, void *userdat client_path = pa_dbusiface_core_get_client_path(s->core, client); for (i = 0; i < channel_map->channels; ++i) channels[i] = channel_map->map[i]; + if (!resample_method) + resample_method = ""; pa_assert_se((reply = dbus_message_new_method_return(msg))); |