summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/alsa/alsa-stream.c')
-rw-r--r--backends/alsa/alsa-stream.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/alsa/alsa-stream.c b/backends/alsa/alsa-stream.c
index bce66ec..fc72f65 100644
--- a/backends/alsa/alsa-stream.c
+++ b/backends/alsa/alsa-stream.c
@@ -20,6 +20,7 @@
#include <libmatemixer/matemixer.h>
#include <libmatemixer/matemixer-private.h>
+#include "alsa-device.h"
#include "alsa-element.h"
#include "alsa-stream.h"
#include "alsa-stream-control.h"
@@ -94,7 +95,12 @@ alsa_stream_new (const gchar *name,
MateMixerDevice *device,
MateMixerDirection direction)
{
- const gchar *label = mate_mixer_device_get_label (device);
+ const gchar *label;
+
+ g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (ALSA_IS_DEVICE (device), NULL);
+
+ label = mate_mixer_device_get_label (device);
return g_object_new (ALSA_TYPE_STREAM,
"name", name,