Skip to content

Commit 1ad0269

Browse files
ktrzcinxlgirdwood
authored andcommitted
logger: Fix log_err usage at early stages of sof-logger run
This function could fail when called before convert() Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
1 parent 2de5060 commit 1ad0269

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/logger/misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extern struct convert_config *global_config;
4545

4646
void log_err(const char *fmt, ...)
4747
{
48-
FILE *out_fd = global_config->out_fd;
48+
FILE *out_fd = global_config ? global_config->out_fd : NULL;
4949
static const char prefix[] = "error: ";
5050
ssize_t needed_size;
5151
va_list args, args_alloc;

0 commit comments

Comments
 (0)