diff options
author | Don Kjer <don@lindenlab.com> | 2007-05-02 21:24:47 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-05-02 21:24:47 +0000 |
commit | 1c909afe3998778e4cc045c9ab733e8afbf7c25b (patch) | |
tree | 75c00a32a8e305280cbec253195d1113d628fc3e /indra/newview/llviewerparceloverlay.cpp | |
parent | bc59c04653bf1404e8148a8169208b146a123b28 (diff) |
svn merge -r 60342:61148 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/newview/llviewerparceloverlay.cpp')
-rw-r--r-- | indra/newview/llviewerparceloverlay.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index f5d7aa1094..58785805b2 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -465,20 +465,21 @@ void LLViewerParcelOverlay::updatePropertyLines() // shuffling. S32 new_vertex_count = new_vertex_array.count(); - // NOTE: If the new_vertex_count is 0 and wasn't 0 previously - // the arrays are still allocated as the arrays aren't set to NULL, etc. - // This won't cause any problems, but might waste a few cycles copying over - // old data. - jwolk - if ( !(mVertexArray && mColorArray && new_vertex_count == mVertexCount) && new_vertex_count > 0 ) + if (!(mVertexArray && mColorArray && new_vertex_count == mVertexCount)) { // ...need new arrays delete[] mVertexArray; + mVertexArray = NULL; delete[] mColorArray; + mColorArray = NULL; mVertexCount = new_vertex_count; - mVertexArray = new F32[3 * mVertexCount]; - mColorArray = new U8 [4 * mVertexCount]; + if (new_vertex_count > 0) + { + mVertexArray = new F32[3 * mVertexCount]; + mColorArray = new U8 [4 * mVertexCount]; + } } // Copy the new data into the arrays |