From 4338817ca2c83c2fec688fc746c913af1adf4600 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Thu, 29 Aug 2024 08:13:40 +1000 Subject: [PATCH] Fix copying private data when source pointer is NULL (#5733) --- code/Common/SceneCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Common/SceneCombiner.cpp b/code/Common/SceneCombiner.cpp index 7954d4d01..09215d055 100644 --- a/code/Common/SceneCombiner.cpp +++ b/code/Common/SceneCombiner.cpp @@ -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; } }