summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-stream-control.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/alsa/alsa-stream-control.c
parentd32ca3f420d036cd750fc1aad7f95da40559cc5d (diff)
downloadlibmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.bz2
libmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.xz
Improve error checking in many places
Diffstat (limited to 'backends/alsa/alsa-stream-control.c')
-rw-r--r--backends/alsa/alsa-stream-control.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/alsa/alsa-stream-control.c b/backends/alsa/alsa-stream-control.c
index 6e09a09..5fd643e 100644
--- a/backends/alsa/alsa-stream-control.c
+++ b/backends/alsa/alsa-stream-control.c
@@ -649,24 +649,32 @@ alsa_stream_control_set_fade (MateMixerStreamControl *mmsc, gfloat fade)
static guint
alsa_stream_control_get_min_volume (MateMixerStreamControl *mmsc)
{
+ g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (mmsc), 0);
+
return ALSA_STREAM_CONTROL (mmsc)->priv->data.min;
}
static guint
alsa_stream_control_get_max_volume (MateMixerStreamControl *mmsc)
{
+ g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (mmsc), 0);
+
return ALSA_STREAM_CONTROL (mmsc)->priv->data.max;
}
static guint
alsa_stream_control_get_normal_volume (MateMixerStreamControl *mmsc)
{
+ g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (mmsc), 0);
+
return ALSA_STREAM_CONTROL (mmsc)->priv->data.max;
}
static guint
alsa_stream_control_get_base_volume (MateMixerStreamControl *mmsc)
{
+ g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (mmsc), 0);
+
return ALSA_STREAM_CONTROL (mmsc)->priv->data.max;
}