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-device-switch.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-device-switch.c')
-rw-r--r-- | backends/pulse/pulse-device-switch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/pulse/pulse-device-switch.c b/backends/pulse/pulse-device-switch.c index c6b8316..4bd32ce 100644 --- a/backends/pulse/pulse-device-switch.c +++ b/backends/pulse/pulse-device-switch.c @@ -89,6 +89,10 @@ pulse_device_switch_dispose (GObject *object) PulseDeviceSwitch * pulse_device_switch_new (const gchar *name, const gchar *label, PulseDevice *device) { + g_return_val_if_fail (name != NULL, NULL); + g_return_val_if_fail (label != NULL, NULL); + g_return_val_if_fail (PULSE_IS_DEVICE (device), NULL); + return g_object_new (PULSE_TYPE_DEVICE_SWITCH, "name", name, "label", label, |