From fd48526f785a7dfd59ce50c4e1ef74b655068744 Mon Sep 17 00:00:00 2001 From: Tinny Ng <tng@apache.org> Date: Wed, 4 Apr 2001 13:14:57 +0000 Subject: [PATCH] Error checking for null content spec. By Alberto Massari. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172588 13f79535-47bb-0310-9956-ffa450edef68 --- src/validators/DTD/DTDElementDecl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/validators/DTD/DTDElementDecl.cpp b/src/validators/DTD/DTDElementDecl.cpp index a9de99bb4..7bdf62aec 100644 --- a/src/validators/DTD/DTDElementDecl.cpp +++ b/src/validators/DTD/DTDElementDecl.cpp @@ -351,6 +351,9 @@ XMLContentModel* DTDElementDecl::createChildModel(const Grammar* grammar) const // Get the content spec node of the element const ContentSpecNode* specNode = getContentSpec(); + if(!specNode) + ThrowXML(RuntimeException, XMLExcepts::CM_UnknownCMSpecType); + // // Do a sanity check that the node is does not have a PCDATA id. Since, // if it was, it should have already gotten taken by the Mixed model. -- GitLab