summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-source-switch.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-source-switch.c
parentd32ca3f420d036cd750fc1aad7f95da40559cc5d (diff)
downloadlibmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.bz2
libmatemixer-9772797c31ebed2417b42a9389caae1b16847e86.tar.xz
Improve error checking in many places
Diffstat (limited to 'backends/pulse/pulse-source-switch.c')
-rw-r--r--backends/pulse/pulse-source-switch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/pulse/pulse-source-switch.c b/backends/pulse/pulse-source-switch.c
index 9616bb1..76f97f0 100644
--- a/backends/pulse/pulse-source-switch.c
+++ b/backends/pulse/pulse-source-switch.c
@@ -24,6 +24,7 @@
#include "pulse-connection.h"
#include "pulse-port.h"
#include "pulse-port-switch.h"
+#include "pulse-source.h"
#include "pulse-source-switch.h"
#include "pulse-stream.h"
@@ -52,6 +53,10 @@ pulse_source_switch_init (PulseSourceSwitch *swtch)
PulsePortSwitch *
pulse_source_switch_new (const gchar *name, const gchar *label, PulseSource *source)
{
+ g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (label != NULL, NULL);
+ g_return_val_if_fail (PULSE_IS_SOURCE (source), NULL);
+
return g_object_new (PULSE_TYPE_SOURCE_SWITCH,
"name", name,
"label", label,