Merge branch 'master' into dependabot/github_actions/actions/cache-3

pull/4612/head
Kim Kulling 2022-07-06 09:37:07 +02:00 committed by GitHub
commit 744ed2256b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -71,7 +71,7 @@ jobs:
- name: Remove contrib directory for Hunter builds - name: Remove contrib directory for Hunter builds
if: contains(matrix.name, 'hunter') if: contains(matrix.name, 'hunter')
uses: JesseTG/rm@v1.0.2 uses: JesseTG/rm@v1.0.3
with: with:
path: contrib path: contrib

View File

@ -129,10 +129,20 @@ void Q3DImporter::InternReadFile(const std::string &pFile,
unsigned int numTextures = (unsigned int)stream.GetI4(); unsigned int numTextures = (unsigned int)stream.GetI4();
std::vector<Material> materials; std::vector<Material> materials;
try {
materials.reserve(numMats); materials.reserve(numMats);
} catch(const std::bad_alloc&) {
ASSIMP_LOG_ERROR("Invalid alloc for materials.");
throw DeadlyImportError("Invalid Quick3D-file, material allocation failed.");
}
std::vector<Mesh> meshes; std::vector<Mesh> meshes;
try {
meshes.reserve(numMeshes); meshes.reserve(numMeshes);
} catch(const std::bad_alloc&) {
ASSIMP_LOG_ERROR("Invalid alloc for meshes.");
throw DeadlyImportError("Invalid Quick3D-file, mesh allocation failed.");
}
// Allocate the scene root node // Allocate the scene root node
pScene->mRootNode = new aiNode(); pScene->mRootNode = new aiNode();