diff options
author | Michal Ratajsky <[email protected]> | 2016-01-04 20:31:14 +0100 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2016-01-04 20:31:14 +0100 |
commit | 9772797c31ebed2417b42a9389caae1b16847e86 (patch) | |
tree | 0257271d6f8387ce89984bf8341b11186381c8d5 /backends/pulse/pulse-connection.c | |
parent | d32ca3f420d036cd750fc1aad7f95da40559cc5d (diff) | |
download | libmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.bz2 libmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.xz |
Improve error checking in many places
Diffstat (limited to 'backends/pulse/pulse-connection.c')
-rw-r--r-- | backends/pulse/pulse-connection.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backends/pulse/pulse-connection.c b/backends/pulse/pulse-connection.c index 995b522..62156c1 100644 --- a/backends/pulse/pulse-connection.c +++ b/backends/pulse/pulse-connection.c @@ -786,6 +786,7 @@ pulse_connection_set_default_sink (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (name != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -804,6 +805,7 @@ pulse_connection_set_default_source (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (name != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -823,6 +825,8 @@ pulse_connection_set_card_profile (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (card != NULL, FALSE); + g_return_val_if_fail (profile != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -863,6 +867,7 @@ pulse_connection_set_sink_volume (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (volume != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -883,6 +888,7 @@ pulse_connection_set_sink_port (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (port != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -923,6 +929,7 @@ pulse_connection_set_sink_input_volume (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (volume != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -963,6 +970,7 @@ pulse_connection_set_source_volume (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (volume != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -983,6 +991,7 @@ pulse_connection_set_source_port (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (port != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -1023,6 +1032,7 @@ pulse_connection_set_source_output_volume (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (volume != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -1158,6 +1168,7 @@ pulse_connection_write_ext_stream (PulseConnection *connection, pa_operation *op; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (info != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; @@ -1179,6 +1190,7 @@ pulse_connection_delete_ext_stream (PulseConnection *connection, gchar **names; g_return_val_if_fail (PULSE_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (name != NULL, FALSE); if (connection->priv->state != PULSE_CONNECTION_CONNECTED) return FALSE; |