From 9b25749536990cea814c399be4d1dae5ace01fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Terziman?= Date: Mon, 10 Feb 2014 15:11:13 +0100 Subject: [PATCH] Fixed bug in merging of materials --- code/SceneCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index 9df2fb26a..d6b138d74 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -916,7 +916,7 @@ void SceneCombiner::MergeMaterials(aiMaterial** dest, const aiMaterialProperty* prop_exist; if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mType, sprop->mIndex, &prop_exist) != AI_SUCCESS) { // If not, we add it to the new material - aiMaterialProperty* prop = out->mProperties[i] = new aiMaterialProperty(); + aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty(); prop->mDataLength = sprop->mDataLength; prop->mData = new char[prop->mDataLength];