diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-02-05 17:46:38 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-02-05 17:49:11 +0300 |
commit | ea2e6995a9083e1dff0b46909397cba2c639884e (patch) | |
tree | 8d3cb940d89cea06c540b03df59d7c47c07ef967 /source/blender/collada | |
parent | d2c0df28424b93dbcc1a92423e0b68d2e9590945 (diff) |
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.
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/ErrorHandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp index af9d10c7841..4f70281fb45 100644 --- a/source/blender/collada/ErrorHandler.cpp +++ b/source/blender/collada/ErrorHandler.cpp @@ -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); |