Fix copying private data when source pointer is NULL (#5733)

pull/5721/head^2
Vincent Fazio 2024-08-29 08:13:40 +10:00 committed by GitHub
parent fd7ad4a9d8
commit 4338817ca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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; dest->mFlags = src->mFlags;
// source private data might be nullptr if the scene is user-allocated (i.e. for use with the export API) // 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; ScenePriv(dest)->mPPStepsApplied = ScenePriv(src) ? ScenePriv(src)->mPPStepsApplied : 0;
} }
} }