clamp instead of assert when running out of room during reflow
parent
724f5fbb7f
commit
9abe9bf5df
|
|
@ -1137,6 +1137,10 @@ void LLTextBase::reflow(S32 start_index)
|
|||
// grow line height as necessary based on reported height of this segment
|
||||
line_height = llmax(line_height, segment_height);
|
||||
remaining_pixels -= segment_width;
|
||||
if (remaining_pixels < 0)
|
||||
{
|
||||
remaining_pixels = 0;
|
||||
}
|
||||
|
||||
// getNumChars() and getDimensions() should return consistent results
|
||||
llassert_always(remaining_pixels >= 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue