fix unittest check - cannot work, just crash shall not occurr any more.

pull/3279/head
kimkulling 2020-06-12 12:29:51 +02:00
parent 1b0b4d8d1a
commit ad62e6e863
2 changed files with 3 additions and 2 deletions

View File

@ -722,7 +722,7 @@ template <class T>
void Accessor::ExtractData(T *&outData) {
uint8_t *data = GetPointer();
if (!data) {
throw DeadlyImportError("GLTF: data is NULL");
throw DeadlyImportError("GLTF2: data is nullptr.");
}
const size_t elemSize = GetElementSize();

View File

@ -535,8 +535,9 @@ TEST_F(utglTF2ImportExport, norootnode_scenewithoutnodes) {
ASSERT_NE(scene->mRootNode, nullptr);
}
// Shall not crash!
TEST_F(utglTF2ImportExport, norootnode_issue_3269) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/issue_3269/texcoord_crash.gltf", aiProcess_ValidateDataStructure);
ASSERT_NE(scene, nullptr);
ASSERT_EQ(scene, nullptr);
}