diff --git a/code/RawLoader.cpp b/code/RawLoader.cpp index 2b76455d7..f8ca4e689 100644 --- a/code/RawLoader.cpp +++ b/code/RawLoader.cpp @@ -243,8 +243,10 @@ void RAWImporter::InternReadFile( const std::string& pFile, { cc = &pScene->mRootNode; pScene->mRootNode->mNumChildren = 0; + } else { + cc = new aiNode*[pScene->mRootNode->mNumChildren]; + pScene->mRootNode->mChildren = cc; } - else cc = pScene->mRootNode->mChildren = new aiNode*[pScene->mRootNode->mNumChildren]; pScene->mNumMaterials = pScene->mNumMeshes; aiMaterial** mats = pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];