From 5b6d1f4d2c7015a7c8217a3b0a05bf001561e42f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 30 Jan 2015 07:49:04 +0100 Subject: [PATCH] Update config_get_audio_driver_resampler_options --- audio/audio_resampler_driver.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/audio/audio_resampler_driver.c b/audio/audio_resampler_driver.c index 0c225fd2f1..cb2d7ddcc2 100644 --- a/audio/audio_resampler_driver.c +++ b/audio/audio_resampler_driver.c @@ -107,6 +107,9 @@ const char* config_get_audio_resampler_driver_options(void) attr.i = 0; + if (!options_l) + return NULL; + for (i = 0; resampler_drivers[i]; i++) { const char *opt = resampler_drivers[i]->ident; @@ -116,6 +119,13 @@ const char* config_get_audio_resampler_driver_options(void) options = (char*)calloc(options_len, sizeof(char)); + if (!options) + { + string_list_free(options_l); + options_l = NULL; + return NULL; + } + string_list_join_concat(options, options_len, options_l, "|"); string_list_free(options_l);