summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-switch-option.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-switch-option.c
parentd32ca3f420d036cd750fc1aad7f95da40559cc5d (diff)
downloadlibmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.bz2
libmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.xz
Improve error checking in many places
Diffstat (limited to 'backends/alsa/alsa-switch-option.c')
-rw-r--r--backends/alsa/alsa-switch-option.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/alsa/alsa-switch-option.c b/backends/alsa/alsa-switch-option.c
index 1800df2..81326ce 100644
--- a/backends/alsa/alsa-switch-option.c
+++ b/backends/alsa/alsa-switch-option.c
@@ -54,6 +54,9 @@ alsa_switch_option_new (const gchar *name,
{
AlsaSwitchOption *option;
+ g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (label != NULL, NULL);
+
option = g_object_new (ALSA_TYPE_SWITCH_OPTION,
"name", name,
"label", label,