Fix T56892: Crash on Collada .dae import

In this case the ERROR_REQUIRED_ATTRIBUTE_MISSING seem to be fatal so
stop the import to avoid crashing if we run into this error.
This commit is contained in:
Sebastian Parborg 2020-02-05 15:46:38 +01:00
parent d2c0df2842
commit ea2e6995a9
Notes: blender-bot 2023-02-14 05:52:32 +01:00
Referenced by issue #56892, Crash on Collada .dae import
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
error_context = "File access";
}
else if (parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_REQUIRED_ATTRIBUTE_MISSING) {
isError = true;
}
else {
isError = (parserError.getSeverity() !=
GeneratedSaxParser::ParserError::Severity::SEVERITY_ERROR_NONCRITICAL);