aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerparceloverlay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerparceloverlay.cpp')
-rw-r--r--linden/indra/newview/llviewerparceloverlay.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/newview/llviewerparceloverlay.cpp b/linden/indra/newview/llviewerparceloverlay.cpp
index d5ad910..e31b714 100644
--- a/linden/indra/newview/llviewerparceloverlay.cpp
+++ b/linden/indra/newview/llviewerparceloverlay.cpp
@@ -485,20 +485,21 @@ void LLViewerParcelOverlay::updatePropertyLines()
485 // shuffling. 485 // shuffling.
486 S32 new_vertex_count = new_vertex_array.count(); 486 S32 new_vertex_count = new_vertex_array.count();
487 487
488 // NOTE: If the new_vertex_count is 0 and wasn't 0 previously 488 if (!(mVertexArray && mColorArray && new_vertex_count == mVertexCount))
489 // the arrays are still allocated as the arrays aren't set to NULL, etc.
490 // This won't cause any problems, but might waste a few cycles copying over
491 // old data. - jwolk
492 if ( !(mVertexArray && mColorArray && new_vertex_count == mVertexCount) && new_vertex_count > 0 )
493 { 489 {
494 // ...need new arrays 490 // ...need new arrays
495 delete[] mVertexArray; 491 delete[] mVertexArray;
492 mVertexArray = NULL;
496 delete[] mColorArray; 493 delete[] mColorArray;
494 mColorArray = NULL;
497 495
498 mVertexCount = new_vertex_count; 496 mVertexCount = new_vertex_count;
499 497
500 mVertexArray = new F32[3 * mVertexCount]; 498 if (new_vertex_count > 0)
501 mColorArray = new U8 [4 * mVertexCount]; 499 {
500 mVertexArray = new F32[3 * mVertexCount];
501 mColorArray = new U8 [4 * mVertexCount];
502 }
502 } 503 }
503 504
504 // Copy the new data into the arrays 505 // Copy the new data into the arrays