mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 03:15:30 +00:00
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.
This commit is contained in:
parent
804c4f4d92
commit
3727b95db5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user