[Bf-blender-cvs] [ea2e6995a90] master: Fix T56892: Crash on Collada .dae import

Sebastian Parborg noreply at git.blender.org
Wed Feb 5 15:47:31 CET 2020


Commit: ea2e6995a9083e1dff0b46909397cba2c639884e
Author: Sebastian Parborg
Date:   Wed Feb 5 15:46:38 2020 +0100
Branches: master
https://developer.blender.org/rBea2e6995a9083e1dff0b46909397cba2c639884e

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.

===================================================================

M	source/blender/collada/ErrorHandler.cpp

===================================================================

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);



More information about the Bf-blender-cvs mailing list