Fix memory handling of xml-nodes in the parser.

This commit is contained in:
Kim Kulling
2020-09-01 21:48:50 +02:00
parent 3c2133a3b9
commit 73fa2cbe88
10 changed files with 86 additions and 406 deletions

View File

@@ -50,9 +50,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class utD3MFImporterExporter : public AbstractImportExportBase {
public:
virtual bool importerTest() {
bool importerTest() override {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3MF/box.3mf", aiProcess_ValidateDataStructure);
if (nullptr == scene) {
return false;
}
EXPECT_EQ(1u, scene->mNumMeshes);
aiMesh *mesh = scene->mMeshes[0];
EXPECT_NE(nullptr, mesh);
@@ -64,7 +68,7 @@ public:
#ifndef ASSIMP_BUILD_NO_EXPORT
virtual bool exporterTest() {
bool exporterTest() override {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3MF/box.3mf", 0);