diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp index 2fa789cb9f..5012b8c44d 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp @@ -1783,8 +1783,11 @@ void plDrawableSpans::SortVisibleSpans(const std::vector& visList, plPi plProfile_IncCount(FacesSorted, totTris); - sortScratch.resize(totTris); - triList.resize(3 * totTris); + if( sortScratch.size() < totTris ) + { + sortScratch.resize(totTris); + triList.resize(3 * totTris); + } hsRadixSort::Elem* elem = sortScratch.data();