diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-08-31 14:55:30 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-08-31 14:55:30 +0000 |
commit | 5d96fff011a51c090fb0a0e41aff0765e5d33121 (patch) | |
tree | 55c4f034f420ce3f45465ea3039c1cdcd3c9e5d8 /parserInternals.c | |
parent | 2ebd7a7a0280ae8abc5d4e4e6abc511f8c3f01c4 (diff) | |
download | libxml2-5d96fff011a51c090fb0a0e41aff0765e5d33121.tar.gz |
doc updates from Heiko Rupp 2 sanity checks from Heiko Rupp Daniel
* libxml.4 parser.c: doc updates from Heiko Rupp
* parserInternals.c: 2 sanity checks from Heiko Rupp
Daniel
Diffstat (limited to 'parserInternals.c')
-rw-r--r-- | parserInternals.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/parserInternals.c b/parserInternals.c index 8e652b3c..40aa0b16 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -2144,6 +2144,12 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt) { xmlSAXHandler *sax; + if(ctxt==NULL) { + xmlGenericError(xmlGenericErrorContext, + "xmlInitParserCtxt: NULL context given\n"); + return; + } + xmlDefaultSAXHandlerInit(); sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler)); @@ -2360,6 +2366,8 @@ xmlNewParserCtxt() void xmlClearParserCtxt(xmlParserCtxtPtr ctxt) { + if (ctxt==NULL) + return; xmlClearNodeInfoSeq(&ctxt->node_seq); xmlInitParserCtxt(ctxt); } |