Added check around setting pScene->mName from asset.scene.
parent
30584c1ec1
commit
98e42e22b8
|
@ -1386,7 +1386,9 @@ void glTF2Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IO
|
||||||
// read the asset file
|
// read the asset file
|
||||||
glTF2::Asset asset(pIOHandler);
|
glTF2::Asset asset(pIOHandler);
|
||||||
asset.Load(pFile, GetExtension(pFile) == "glb");
|
asset.Load(pFile, GetExtension(pFile) == "glb");
|
||||||
pScene->mName = asset.scene->name;
|
if (asset.scene) {
|
||||||
|
pScene->mName = asset.scene->name;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Copy the data out
|
// Copy the data out
|
||||||
|
|
Loading…
Reference in New Issue