Merge pull request #528 from davidgyu/memfix

Fixed buffer access into empty container
This commit is contained in:
Takahito Tejima 2015-05-26 14:55:27 -07:00
commit 47f79e54fc

View File

@ -222,7 +222,7 @@ private:
//
// Additionally, if the client does not want the resulting verts
// compacted, do not attempt to combine weights.
if (_compactWeights and _dests[lastOffset] == dst) {
if (_compactWeights and !_dests.empty() and _dests[lastOffset] == dst) {
// tableSize is exactly _sources.size(), but using tableSize is
// significantly faster.