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.
pull/329/head
钰棋 3 weeks ago committed by GitHub
parent 804c4f4d92
commit 3727b95db5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      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);

Loading…
Cancel
Save