Merge pull request #2865 from LoicFr/master

Fix possible null pointer exception on scene metadata when exporting a glTF2 file
pull/2867/head
Kim Kulling 2020-01-07 21:19:27 +01:00 committed by GitHub
commit a62c44227a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1000,7 +1000,7 @@ void glTF2Exporter::ExportMetadata()
// Copyright
aiString copyright_str;
if (mScene->mMetaData->Get(AI_METADATA_SOURCE_COPYRIGHT, copyright_str)) {
if (mScene->mMetaData != nullptr && mScene->mMetaData->Get(AI_METADATA_SOURCE_COPYRIGHT, copyright_str)) {
asset.copyright = copyright_str.C_Str();
}
}