summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/command.c b/command.c
index 0e0ea7239f..f76f726afc 100644
--- a/command.c
+++ b/command.c
@@ -731,17 +731,16 @@ static int mp_property_audio(m_option_t * prop, int action, void *arg,
{
int current_id = -1, tmp;
+ if (!mpctx->sh_audio)
+ return M_PROPERTY_UNAVAILABLE;
+
switch (action) {
case M_PROPERTY_GET:
- if (!mpctx->sh_audio)
- return M_PROPERTY_UNAVAILABLE;
if (!arg)
return M_PROPERTY_ERROR;
*(int *) arg = audio_id;
return M_PROPERTY_OK;
case M_PROPERTY_PRINT:
- if (!mpctx->sh_audio)
- return M_PROPERTY_UNAVAILABLE;
if (!arg)
return M_PROPERTY_ERROR;