summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-helpers.c
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2016-01-04 20:31:14 +0100
committerMichal Ratajsky <[email protected]>2016-01-04 20:31:14 +0100
commit9772797c31ebed2417b42a9389caae1b16847e86 (patch)
tree0257271d6f8387ce89984bf8341b11186381c8d5 /backends/pulse/pulse-helpers.c
parentd32ca3f420d036cd750fc1aad7f95da40559cc5d (diff)
downloadlibmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.bz2
libmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.xz
Improve error checking in many places
Diffstat (limited to 'backends/pulse/pulse-helpers.c')
-rw-r--r--backends/pulse/pulse-helpers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/backends/pulse/pulse-helpers.c b/backends/pulse/pulse-helpers.c
index 671c3e2..f1272ae 100644
--- a/backends/pulse/pulse-helpers.c
+++ b/backends/pulse/pulse-helpers.c
@@ -73,6 +73,8 @@ const pa_channel_position_t pulse_channel_map_to[MATE_MIXER_CHANNEL_MAX] =
MateMixerStreamControlMediaRole
pulse_convert_media_role_name (const gchar *name)
{
+ g_return_val_if_fail (name != NULL, MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN);
+
if (!strcmp (name, "video")) {
return MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_VIDEO;
}