Fixed buffer access into empty container

Raised as a run-time error by the VS2013 debug STL implementation.
This commit is contained in:
David G. Yu 2015-05-26 11:03:21 -07:00
parent d335c7249e
commit 8568370630

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.