diff options
-rw-r--r-- | options/m_option.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/options/m_option.c b/options/m_option.c index 3c6a1fc946..9f7d250967 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -983,7 +983,7 @@ static int parse_str(struct mp_log *log, const m_option_t *opt, static char *print_str(const m_option_t *opt, const void *val) { - return talloc_strdup(NULL, val ? VAL(val) : NULL); + return talloc_strdup(NULL, VAL(val) ? VAL(val) : ""); } static void copy_str(const m_option_t *opt, void *dst, const void *src) @@ -1279,7 +1279,7 @@ static char *print_str_list(const m_option_t *opt, const void *src) char *ret = NULL; if (!(src && VAL(src))) - return NULL; + return talloc_strdup(NULL, ""); lst = VAL(src); for (int i = 0; lst[i]; i++) { |