Merge pull request #2865 from LoicFr/master
Fix possible null pointer exception on scene metadata when exporting a glTF2 filepull/2867/head
commit
a62c44227a
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue