diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 781562ba2..c80c9e90f 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -619,7 +619,9 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada:: // build a temporary array of pointers to the start of each vertex's weights typedef std::vector< std::pair > IndexPairVector; - std::vector weightStartPerVertex( pSrcController->mWeightCounts.size()); + std::vector weightStartPerVertex; + weightStartPerVertex.resize(pSrcController->mWeightCounts.size(),pSrcController->mWeights.end()); + IndexPairVector::const_iterator pit = pSrcController->mWeights.begin(); for( size_t a = 0; a < pSrcController->mWeightCounts.size(); ++a) {