Fix possible crash in SceneCombiner when the destinations scene has mPrivate==null. Fixes #401.

pull/533/head
Alexander Gessler 2015-04-12 19:53:24 +02:00 committed by Alexander Gessler
parent 13b5b01032
commit e2f234707a
1 changed files with 3 additions and 1 deletions

View File

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