From 3727b95db56e6a97588a1c7ee5321b0878a679e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B0=E6=A3=8B?= <58879897+BBIGQ-LYQ@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:47:56 +0800 Subject: [PATCH] Update mxml-options.c If the passed-in options are null, a segment error occurs when trying to access a member with a null pointer. --- mxml-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxml-options.c b/mxml-options.c index 1f521c2..b6cbf36 100644 --- a/mxml-options.c +++ b/mxml-options.c @@ -538,7 +538,7 @@ _mxml_error(mxml_options_t *options, // I - Load/save options va_end(ap); // And then display the error message... - if (options->error_cb) + if (options && options->error_cb) (options->error_cb)(options->error_cbdata, s); else fprintf(stderr, "%s\n", s);