summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/command.c b/core/command.c
index 31097e1030..8ba58867dd 100644
--- a/core/command.c
+++ b/core/command.c
@@ -571,12 +571,12 @@ static int mp_property_metadata(m_option_t *prop, int action, void *arg,
case M_PROPERTY_PRINT: {
char **list = demuxer->info;
char *res = NULL;
- for (int n = 0; list[n]; n += 2) {
+ for (int n = 0; list && list[n]; n += 2) {
res = talloc_asprintf_append_buffer(res, "%s: %s\n",
list[n], list[n + 1]);
}
*(char **)arg = res;
- return M_PROPERTY_OK;
+ return res ? M_PROPERTY_OK : M_PROPERTY_UNAVAILABLE;
}
case M_PROPERTY_KEY_ACTION: {
struct m_property_action_arg *ka = arg;