Fix copying private data when source pointer is NULL

pull/5733/head
Vincent Fazio 2024-08-28 10:33:18 +08:00
parent fd7ad4a9d8
commit 25f4a04dbb
1 changed files with 1 additions and 1 deletions

View File

@ -1057,7 +1057,7 @@ void SceneCombiner::CopyScene(aiScene **_dest, const aiScene *src, bool allocate
dest->mFlags = src->mFlags;
// source private data might be nullptr if the scene is user-allocated (i.e. for use with the export API)
if (dest->mPrivate != nullptr) {
if (src->mPrivate != nullptr) {
ScenePriv(dest)->mPPStepsApplied = ScenePriv(src) ? ScenePriv(src)->mPPStepsApplied : 0;
}
}