We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ec20f2 commit d8324b0Copy full SHA for d8324b0
1 file changed
ext/libxml/ruby_xml_error.c
@@ -160,9 +160,12 @@ static VALUE rxml_error_reset_handler(VALUE self)
160
161
NORETURN(void rxml_raise(const xmlError *xerror))
162
{
163
- /* Wrap error up as Ruby object and send it off to ruby */
164
- VALUE error = rxml_error_wrap(xerror);
165
- rb_exc_raise(error);
+ if (xerror)
+ {
+ /* Wrap error up as Ruby object and send it off to ruby */
166
+ VALUE error = rxml_error_wrap(xerror);
167
+ rb_exc_raise(error);
168
+ }
169
}
170
171
void rxml_init_error(void)
0 commit comments