| 1 | Taken from: https://github.com/OpenTTD/OpenTTD/pull/15962
|
| 2 |
|
| 3 | diff --git a/src/gfx_layout_icu.cpp b/src/gfx_layout_icu.cpp
|
| 4 | index c569d7cb3cb52..e1a678ea345db 100644
|
| 5 | |
| 6 | |
| 7 | @@ -435,7 +435,8 @@ std::unique_ptr<const ICUParagraphLayout::Line> ICUParagraphLayout::NextLine(int
|
| 8 | if (cur_width > max_width) {
|
| 9 | /* Create a break-iterator to find a good place to break lines. */
|
| 10 | auto break_iterator = ICUParagraphLayoutFactory::GetBreakIterator();
|
| 11 | - break_iterator->setText(icu::UnicodeString(this->buff, this->buff_length));
|
| 12 | + icu::UnicodeString text(this->buff, this->buff_length);
|
| 13 | + break_iterator->setText(text);
|
| 14 |
|
| 15 | auto overflow_run = last_run - 1;
|
| 16 |
|