Commit aae00459 authored by Guido Gunther's avatar Guido Gunther
Browse files

wys-audio: Guard public methods

This makes sure we get the right type passed in and
also don't crash when there's no modem.
parent 40eaa06e
Pipeline #64383 passed with stages
in 5 minutes and 54 seconds
......@@ -1165,6 +1165,9 @@ void
wys_audio_ensure_loopback (WysAudio *self,
WysDirection direction)
{
g_return_if_fail (WYS_IS_AUDIO (self));
g_return_if_fail (self->modem);
switch (direction)
{
case WYS_DIRECTION_FROM_NETWORK:
......@@ -1262,5 +1265,8 @@ void
wys_audio_ensure_no_loopback (WysAudio *self,
WysDirection direction)
{
g_return_if_fail (WYS_IS_AUDIO (self));
g_return_if_fail (self->modem);
ensure_no_loopback (self->ctx, self->modem, direction);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment