neilg 2003/12/29 22:01:20 Modified: c/src/xercesc/validators/schema SchemaValidator.cpp Log: fix segfault when validation of a union type fails Revision Changes Path 1.51 +16 -10 xml-xerces/c/src/xercesc/validators/schema/SchemaValidator.cpp Index: SchemaValidator.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/SchemaValidator.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- SchemaValidator.cpp 24 Dec 2003 15:24:16 -0000 1.50 +++ SchemaValidator.cpp 30 Dec 2003 06:01:20 -0000 1.51 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.51 2003/12/30 06:01:20 neilg + * fix segfault when validation of a union type fails + * * Revision 1.50 2003/12/24 15:24:16 cargilld * More updates to memory management so that the static memory manager. * @@ -733,15 +736,18 @@ DatatypeValidator *memberDTV = context->getValidatingMemberType(); // actual type for DOMTypeInfo is memberDTV fMostRecentAttrValidator = memberDTV; - DatatypeValidator::ValidatorType memberDTVType = memberDTV->getType(); - if (memberDTVType == DatatypeValidator::ID) { - thisIsAnId = true; - } - else if (memberDTVType == DatatypeValidator::IDREF) { - // if in prevalidatoin, do not add attDef to IDREFList - if (preValidation) - getScanner()->getValidationContext()->toCheckIdRefList(false); - + // no member datatype validator if there was an error + if(memberDTV) + { + DatatypeValidator::ValidatorType memberDTVType = memberDTV->getType(); + if (memberDTVType == DatatypeValidator::ID) { + thisIsAnId = true; + } + else if (memberDTVType == DatatypeValidator::IDREF) { + // if in prevalidatoin, do not add attDef to IDREFList + if (preValidation) + getScanner()->getValidationContext()->toCheckIdRefList(false); + } } } else if (attDefDVType == DatatypeValidator::ID) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]